aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorOleg Nesterov <[email protected]>2014-04-07 22:38:29 +0000
committerLinus Torvalds <[email protected]>2014-04-07 23:36:03 +0000
commitc39df5fa37b0623589508c95515b4aa1531c524e (patch)
treea6556cb0f29bed429e17c8f6c6c41f95b4f96d72 /fs/proc/array.c
parentmm/zswap.c: remove unnecessary parentheses (diff)
downloadkernel-c39df5fa37b0623589508c95515b4aa1531c524e.tar.gz
kernel-c39df5fa37b0623589508c95515b4aa1531c524e.zip
exit: call disassociate_ctty() before exit_task_namespaces()
Commit 8aac62706ada ("move exit_task_namespaces() outside of exit_notify()") breaks pppd and the exiting service crashes the kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000028 IP: ppp_register_channel+0x13/0x20 [ppp_generic] Call Trace: ppp_asynctty_open+0x12b/0x170 [ppp_async] tty_ldisc_open.isra.2+0x27/0x60 tty_ldisc_hangup+0x1e3/0x220 __tty_hangup+0x2c4/0x440 disassociate_ctty+0x61/0x270 do_exit+0x7f2/0xa50 ppp_register_channel() needs ->net_ns and current->nsproxy == NULL. Move disassociate_ctty() before exit_task_namespaces(), it doesn't make sense to delay it after perf_event_exit_task() or cgroup_exit(). This also allows to use task_work_add() inside the (nontrivial) code paths in disassociate_ctty(). Investigated by Peter Hurley. Signed-off-by: Oleg Nesterov <[email protected]> Reported-by: Sree Harsha Totakura <[email protected]> Cc: Peter Hurley <[email protected]> Cc: Sree Harsha Totakura <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Andrey Vagin <[email protected]> Cc: Al Viro <[email protected]> Cc: <[email protected]> [v3.10+] 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