]> git.karo-electronics.de Git - karo-tx-linux.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 18:41:41 +0000 (18:41 +0000)
committerChris Wright <chrisw@sous-sol.org>
Mon, 9 Jun 2008 18:27:05 +0000 (11:27 -0700)
commit3dac273cad59097a8ab335958a7c5904f0a99d65
tree49e71ea48d969b8239c3298d9d0104cc95533fcb
parent7acdaecd4c3d8ab57c13e04e0cfd892d84952e9c
pagemap: fix bug in add_to_pagemap, require aligned-length reads of /proc/pid/pagemap

upstream commit: aae8679b0ebcaa92f99c1c3cb0cd651594a43915

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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
fs/proc/task_mmu.c