]> git.baikalelectronics.ru Git - kernel.git/commit
pagemap: require aligned-length, non-null reads of /proc/pid/pagemap
authorVitaly Mayatskikh <v.mayatskih@gmail.com>
Thu, 30 Apr 2009 22:08:18 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 May 2009 22:36:09 +0000 (15:36 -0700)
commita3c4938907ce7c90a336cd80362f6708236f88ee
tree9db0c3d2192286e818e6f6827fda3602b7d5a466
parentf4f6cbf012fb3e062fedab6657fcc11a34821a41
pagemap: require aligned-length, non-null reads of /proc/pid/pagemap

The intention of commit b6cc35690cc5989f1b55aad70a041705d482d0f2
("pagemap: fix bug in add_to_pagemap, require aligned-length reads of
/proc/pid/pagemap") was to force reads of /proc/pid/pagemap to be a
multiple of 8 bytes, but now it allows to read 0 bytes, which actually
puts some data to user's buffer.  According to POSIX, if count is zero,
read() should return zero and has no other results.

Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Cc: Thomas Tuttle <ttuttle@google.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: Alexey Dobriyan <adobriyan@gmail.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