aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorEric W. Biederman <[email protected]>2020-04-24 20:41:20 +0000
committerEric W. Biederman <[email protected]>2020-04-24 20:49:00 +0000
commit6ade99ec6175ab2b54c227521e181e1c3c2bfc8a (patch)
treebcbb3ed8d7cb60920556673bd571a8206c21e759 /fs/proc/array.c
parentsignal: Avoid corrupting si_pid and si_uid in do_notify_parent (diff)
downloadkernel-6ade99ec6175ab2b54c227521e181e1c3c2bfc8a.tar.gz
kernel-6ade99ec6175ab2b54c227521e181e1c3c2bfc8a.zip
proc: Put thread_pid in release_task not proc_flush_pid
Oleg pointed out that in the unlikely event the kernel is compiled with CONFIG_PROC_FS unset that release_task will now leak the pid. Move the put_pid out of proc_flush_pid into release_task to fix this and to guarantee I don't make that mistake again. When possible it makes sense to keep get and put in the same function so it can easily been seen how they pair up. Fixes: 7bc3e6e55acf ("proc: Use a list of inodes to flush from proc") Reported-by: Oleg Nesterov <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions