summaryrefslogtreecommitdiffstats
path: root/arch/s390/lib
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-03-21 08:24:11 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-03-21 13:35:38 +0100
commitb7fef2dd7217d9e3f35c948e87297451e55c9709 (patch)
tree87bd5f483725152ca3f80046fd26517a9fc9068a /arch/s390/lib
parent94f9852de86447088e8e3c12d8b5a8f996acee32 (diff)
downloadop-kernel-dev-b7fef2dd7217d9e3f35c948e87297451e55c9709.zip
op-kernel-dev-b7fef2dd7217d9e3f35c948e87297451e55c9709.tar.gz
s390/uaccess: fix clear_user_pt()
The page table walker variant of clear_user() is supposed to copy the contents of the empty zero page to user space. However since 238ec4ef "[S390] zero page cache synonyms" empty_zero_page is not anymore the page itself but contains the pointer to the empty zero pages. Therefore the page table walker variant of clear_user() copied the address of the first empty zero page and afterwards more or less random data to user space instead of clearing the given user space range. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/lib')
-rw-r--r--arch/s390/lib/uaccess_pt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c
index dff631d..6771fdd 100644
--- a/arch/s390/lib/uaccess_pt.c
+++ b/arch/s390/lib/uaccess_pt.c
@@ -197,7 +197,7 @@ size_t copy_to_user_pt(size_t n, void __user *to, const void *from)
static size_t clear_user_pt(size_t n, void __user *to)
{
- void *zpage = &empty_zero_page;
+ void *zpage = (void *) empty_zero_page;
long done, size, ret;
done = 0;
OpenPOWER on IntegriCloud