aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2010-05-26 21:43:15 +0000
committerLinus Torvalds <[email protected]>2010-05-27 16:12:46 +0000
commit4dec2a91fd7e8815d730afbfdcf085cbf53433ac (patch)
treecd33cc793abf532d4ca212d09c1e8d3154a8b530 /fs/proc/array.c
parentia64: ptrace_attach_sync_user_rbs: avoid "task->signal != NULL" checks (diff)
downloadkernel-4dec2a91fd7e8815d730afbfdcf085cbf53433ac.tar.gz
kernel-4dec2a91fd7e8815d730afbfdcf085cbf53433ac.zip
fork/exit: move tty_kref_put() outside of __cleanup_signal()
tty_kref_put() has two callsites in copy_process() paths, 1. if copy_process() suceeds it is called before we copy signal->tty from parent 2. otherwise it is called from __cleanup_signal() under bad_fork_cleanup_signal: label In both cases tty_kref_put() is not right and unneeded because we don't have the balancing tty_kref_get(). Fortunately, this is harmless because this can only happen without CLONE_THREAD, and in this case signal->tty must be NULL. Remove tty_kref_put() from copy_process() and __cleanup_signal(), and change another caller of __cleanup_signal(), __exit_signal(), to call tty_kref_put() by hand. I hope this change makes sense by itself, but it is also needed to make ->signal refcountable. Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Alan Cox <[email protected]> Acked-by: Roland McGrath <[email protected]> Cc: Greg KH <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions