]> git.karo-electronics.de Git - linux-beck.git/commit
/dev/mem: dont allow seek to last page
authorWu Fengguang <fengguang.wu@intel.com>
Wed, 10 Mar 2010 23:21:51 +0000 (15:21 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Mar 2010 23:52:35 +0000 (15:52 -0800)
commitdcefafb6ac90ece8d68a6c203105f3d313e52da4
treec0aad5b135dc95f2aaa8d3c089a1ac44144ef424
parent2cb9a75d13676d75bcc6fbc6f885403795581913
/dev/mem: dont allow seek to last page

So as to return a uniform error -EOVERFLOW instead of a random one:

# kmem-seek 0xfffffffffffffff0
seek /dev/kmem: Device or resource busy
# kmem-seek 0xfffffffffffffff1
seek /dev/kmem: Block device required

Suggested by OGAWA Hirofumi.

Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/mem.c