proc: do proper range check on readdir offset
commit2a0c421ba95bb341035cd41a4ded4f75376d3763
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 18 Apr 2011 17:36:54 +0000 (18 10:36 -0700)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Apr 2011 14:53:38 +0000 (30 16:53 +0200)
tree200e8dbc7fa2d0d60aeb6c7aa0105801d2abfa88
parentb1894b799b447994200e56efc889f1014d0723cb
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>
fs/proc/base.c