s390/crash: fix incorrect number of bytes to copy to user space
authorAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 15 Jul 2022 10:59:33 +0000 (12:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:10 +0000 (14:24 +0200)
commitf1415771f6a1e2d63265bf8399946d2ead837171
tree0fbe544230f66f2a3fbb65998fdb5f4ad5cb14b2
parent2165fd2bae8ad2cbf2d79b80d13f6e896eeaefe6
s390/crash: fix incorrect number of bytes to copy to user space

[ Upstream commit f6749da17a34eb08c9665f072ce7c812ff68aad2 ]

The number of bytes in a chunk is correctly calculated, but instead
the total number of bytes is passed to copy_to_user_real() function.

Reported-by: Matthew Wilcox <willy@infradead.org>
Fixes: df9694c7975f ("s390/dump: streamline oldmem copy functions")
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/crash_dump.c