]> git.karo-electronics.de Git - karo-tx-linux.git/commit
proc: do proper range check on readdir offset
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 18 Apr 2011 17:36:54 +0000 (10:36 -0700)
committerAndi Kleen <ak@linux.intel.com>
Thu, 28 Apr 2011 15:21:08 +0000 (08:21 -0700)
commit66b681ef4893e65f9219da4c1bb493dc99bde0c5
tree60c3b6d693c3b3529dd2734778ee8528857d9833
parente84891e970ce8baf3c57b5a79d05f52072170052
proc: do proper range check on readdir offset

commit d8bdc59f215e62098bc5b4256fd9928bf27053a1 upstream.

Rather than pass in some random truncated offset to the pid-related
functions, check that the offset is in range up-front.

This is just cleanup, the previous commit fixed the real problem.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
fs/proc/base.c