KAMEZAWA Hiroyuki 325fda71d0 devmem: check vmalloc address on kmem read/write
Otherwise vmalloc_to_page() will BUG().

This also makes the kmem read/write implementation aligned with mem(4):
"References to nonexistent locations cause errors to be returned." Here we
return -ENXIO (inspired by Hugh) if no bytes have been transfered to/from
user space, otherwise return partial read/write results.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-02-02 18:11:22 -08:00
..
2010-01-25 18:01:41 +01:00
2009-12-15 08:53:34 -08:00
2010-01-26 22:22:27 -05:00
2010-01-29 21:03:09 +01:00
2010-01-20 01:23:27 -05:00
2010-02-02 18:11:21 -08:00
2010-01-13 10:01:35 +00:00