Skip to content

Commit

Permalink
s390/uaccess: fix clear_user_pt()
Browse files Browse the repository at this point in the history
The page table walker variant of clear_user() is supposed to copy the
contents of the empty zero page to user space.
However since 238ec4e "[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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Mar 21, 2013
1 parent 94f9852 commit b7fef2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/lib/uaccess_pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b7fef2d

Please sign in to comment.