diff options
| author | Eric W. Biederman <[email protected]> | 2007-11-28 16:21:26 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2007-11-29 09:24:52 -0800 |
| commit | 19fd4bb2a0cfede054e4904e0b167e0ca4f36cc7 (patch) | |
| tree | e37d0ee2c7ea08f6d8721a4e9e807f85994b608a /include/linux | |
| parent | c895078355b6b6e05c60aa205892526dd3390f0a (diff) | |
proc: remove races from proc_id_readdir()
Oleg noticed that the call of task_pid_nr_ns() in proc_pid_readdir
is racy with respect to tasks exiting.
After a bit of examination it also appears that the call itself
is completely unnecessary.
So to fix the problem this patch modifies next_tgid() to return
both a tgid and the task struct in question.
A structure is introduced to return these values because it is
slightly cleaner and easier to optimize, and the resulting code
is a little shorter.
Signed-off-by: "Eric W. Biederman" <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions