]> git.baikalelectronics.ru Git - kernel.git/commit
fs/proc/task_mmu.c v1: fix clear_refs_write() input sanity check
authorVincent Li <macli@brc.ubc.ca>
Tue, 22 Sep 2009 23:45:36 +0000 (16:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 14:39:40 +0000 (07:39 -0700)
commiteef7efaf3edb4d7a2c2e120ce126fa57964c5f66
treeda10040b94e5a0b83de42008c369aa7c3242c333
parentae0ab80a26c198edcf768809ba7f18aa43cfe3d4
fs/proc/task_mmu.c v1: fix clear_refs_write() input sanity check

Andrew Morton pointed out similar string hacking and obfuscated check for
zero-length input at the end of the function, David Rientjes suggested to
use strict_strtol to replace simple_strtol, this patch cover above
suggestions, add removing of leading and trailing whitespace from user
input.  It does not change function behavious.

Signed-off-by: Vincent Li <macli@brc.ubc.ca>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Amerigo Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/task_mmu.c