projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86caa4b
)
s390/crash: fix incorrect number of bytes to copy to user space
author
Alexander Gordeev
<agordeev@linux.ibm.com>
Fri, 15 Jul 2022 10:59:33 +0000
(12:59 +0200)
committer
Alexander Gordeev
<agordeev@linux.ibm.com>
Wed, 20 Jul 2022 15:21:41 +0000
(17:21 +0200)
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>
arch/s390/kernel/crash_dump.c
patch
|
blob
|
history
diff --git
a/arch/s390/kernel/crash_dump.c
b/arch/s390/kernel/crash_dump.c
index 117f13b3d1539ccb5cb4467125eaa85774f1d308..0efee5c49b1ec8b0b01562286d91136b58fe0dc9 100644
(file)
--- a/
arch/s390/kernel/crash_dump.c
+++ b/
arch/s390/kernel/crash_dump.c
@@
-199,7
+199,7
@@
static int copy_oldmem_user(void __user *dst, unsigned long src, size_t count)
} else {
len = count;
}
- rc = copy_to_user_real(dst, src,
count
);
+ rc = copy_to_user_real(dst, src,
len
);
if (rc)
return rc;
}