summaryrefslogtreecommitdiff
path: root/kernel/debug/debug_core.c
diff options
context:
space:
mode:
authorGerald Schaefer <gerald.schaefer@linux.ibm.com>2026-10-21 14:04:26 +0200
committerAlexander Gordeev <agordeev@linux.ibm.com>2026-11-05 17:54:24 +0100
commit0f01f3156f260a5fbce3b4017e1f1ff93cb29465 (patch)
tree22747960e1d7d779b9e858da00466625f67c44e4 /kernel/debug/debug_core.c
parent6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 (diff)
s390/appldata: Fix error handling in appldata_generic_handler()
appldata_generic_handler() always returns 0 after starting or stopping monitor recording. So "echo {0,1} > /proc/sys/appldata/{os,mem,net_sum}" returns success even when DIAG 0xDC failed. A failed start would keep ops->active as 0, so reading the sysctl later would correctly reflect this. A failed stop would falsely set ops->active to 0 and decrement module refcount. This would allow the data gathering module to be removed, and the data buffer to be freed, while z/VM monitor service is still collecting data from that buffer. Fix this by returning -EIO when appldata_diag() failed, and only set ops->active to 0 and decrement module refcount when it succeeded on stop path. Cc: stable@vger.kernel.org Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'kernel/debug/debug_core.c')
0 files changed, 0 insertions, 0 deletions