]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
pagemap: fix bug in add_to_pagemap, require aligned-length reads of /proc/pid/pagemap
authorThomas Tuttle <ttuttle@google.com>
Fri, 6 Jun 2008 05:46:31 +0000 (22:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2008 18:29:11 +0000 (11:29 -0700)
commitaae8679b0ebcaa92f99c1c3cb0cd651594a43915
tree26d761d3c4cca09b58538a576948a7ba720f7d5a
parentd1ee2971f5bd8a16bc5ecfe1b00e14b4fe407c4f
pagemap: fix bug in add_to_pagemap, require aligned-length reads of /proc/pid/pagemap

Fix a bug in add_to_pagemap.  Previously, since pm->out was a char *,
put_user was only copying 1 byte of every PFN, resulting in the top 7
bytes of each PFN not being copied.  By requiring that reads be a multiple
of 8 bytes, I can make pm->out and pm->end u64*s instead of char*s, which
makes put_user work properly, and also simplifies the logic in
add_to_pagemap a bit.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Thomas Tuttle <ttuttle@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/task_mmu.c