From: Vitaly Mayatskikh Date: Thu, 30 Apr 2009 22:08:18 +0000 (-0700) Subject: pagemap: require aligned-length, non-null reads of /proc/pid/pagemap X-Git-Tag: v2.6.30-rc5~73 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0816178638c15ce5472d39d771a96860dff4141a;p=pandora-kernel.git pagemap: require aligned-length, non-null reads of /proc/pid/pagemap The intention of commit aae8679b0ebcaa92f99c1c3cb0cd651594a43915 ("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 Cc: Thomas Tuttle Acked-by: Matt Mackall Cc: Alexey Dobriyan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed