s390/debug: keep debug data on resize
authorPeter Oberparleiter <oberpar@linux.ibm.com>
Fri, 13 Aug 2021 13:05:02 +0000 (15:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:27 +0000 (09:50 +0200)
commit0980d2b21f4d0a0895e29aed27e1f3a14e334f6f
tree1f5a87cde176dac0074990ee2d3454b1b3877ef0
parent0404bf4a660ca8d5c82b8252f55f1f64506aa09a
s390/debug: keep debug data on resize

[ Upstream commit 1204777867e8486a88dbb4793fe256b31ea05eeb ]

Any previously recorded s390dbf debug data is reset when a debug area
is resized using the 'pages' sysfs attribute. This can make
live-debugging unnecessarily complex.

Fix this by copying existing debug data to the newly allocated debug
area when resizing.

Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/debug.c