/dev/zero: avoid repeated access_ok() checks
commitbb521c5de070b86a1e049e2dbf62328f717ff1e8
authorNikanth Karthikesan <knikanth@suse.de>
Wed, 23 Sep 2009 22:57:09 +0000 (23 15:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Sep 2009 14:21:03 +0000 (24 07:21 -0700)
treee2a4416f35e84873f75c0e86ebae5552cf4ae2b2
parent0b8c78f2bfa6ebed0f47794b5995a0d4b3fe456d
/dev/zero: avoid repeated access_ok() checks

In read_zero, we check for access_ok() once for the count bytes.  It is
unnecessarily checked again in clear_user.  Use __clear_user, which does
not check for access_ok().

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/mem.c