diff options
| author | Oleg Nesterov <[email protected]> | 2010-05-26 21:43:17 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-05-27 16:12:46 +0000 |
| commit | 4ada856fb0ee62f6fe3aac3de726deac0640d929 (patch) | |
| tree | 8dd3efbc19f6e1f1dac2ff7afdcd9658fb08b814 /fs/proc/array.c | |
| parent | signals: make task_struct->signal immutable/refcountable (diff) | |
| download | kernel-4ada856fb0ee62f6fe3aac3de726deac0640d929.tar.gz kernel-4ada856fb0ee62f6fe3aac3de726deac0640d929.zip | |
signals: clear signal->tty when the last thread exits
When the last thread exits signal->tty is freed, but the pointer is not
cleared and points to nowhere.
This is OK. Nobody should use signal->tty lockless, and it is no longer
possible to take ->siglock. However this looks wrong even if correct, and
the nice OOPS is better than subtle and hard to find bugs.
Change __exit_signal() to clear signal->tty under ->siglock.
Note: __exit_signal() needs more cleanups. It should not check "sig !=
NULL" to detect the all-dead case and we have the same issues with
signal->stats.
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Ingo Molnar <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Acked-by: Roland McGrath <[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
