From: KAMEZAWA Hiroyuki Date: Tue, 2 Feb 2010 21:44:05 +0000 (-0800) Subject: devmem: check vmalloc address on kmem read/write X-Git-Tag: v2.6.33-rc7~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=325fda71d0badc1073dc59f12a948f24ff05796a;p=pandora-kernel.git 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 Signed-off-by: Wu Fengguang Cc: Greg Kroah-Hartman Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed