]> git.baikalelectronics.ru Git - kernel.git/commit
pagemap: return EINVAL, not EIO, for unaligned reads of kpagecount or kpageflags
authorThomas Tuttle <ttuttle@google.com>
Fri, 6 Jun 2008 05:46:58 +0000 (22:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Jun 2008 18:29:13 +0000 (11:29 -0700)
commit41cb29b87ec71a5f1765f2e842c9ea9bdc3e81a0
tree8c62c8665e343be25cb1d351a0cc4075f70e7241
parent7393b915f6eeb668e698dace6517084472546177
pagemap: return EINVAL, not EIO, for unaligned reads of kpagecount or kpageflags

If the user tries to read from a position that is not a multiple of 8, or
read a number of bytes that is not a multiple of 8, they have passed an
invalid argument to read, for the purpose of reading these files.  It's
not an IO error because we didn't encounter any trouble finding the data
they asked for.

Signed-off-by: Thomas Tuttle <ttuttle@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/proc_misc.c