diff options
author | 2010-02-02 13:44:05 -0800 | |
---|---|---|
committer | 2010-02-02 18:11:22 -0800 | |
commit | 325fda71d0badc1073dc59f12a948f24ff05796a (patch) | |
tree | b143817aba0e8c0d9b4b689bde32fa893a9fb559 /kernel/sysctl.c | |
parent | mm: flush dcache before writing into page to avoid alias (diff) | |
download | linux-dev-325fda71d0badc1073dc59f12a948f24ff05796a.tar.xz linux-dev-325fda71d0badc1073dc59f12a948f24ff05796a.zip |
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>
Diffstat (limited to 'kernel/sysctl.c')
0 files changed, 0 insertions, 0 deletions