mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
[PATCH] namespaces: exit_task_namespaces() invalidates nsproxy
exit_task_namespaces() has replaced the former exit_namespace(). It invalidates task->nsproxy and associated namespaces. This is an issue for the (futur) pid namespace which is required to be valid in exit_notify(). This patch moves exit_task_namespaces() after exit_notify() to keep nsproxy valid. Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Serge E. Hallyn <serue@us.ibm.com> Cc: Kirill Korotaev <dev@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: Andrey Savochkin <saw@sw.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
1651e14e28
commit
fab413a334
@ -920,7 +920,6 @@ fastcall NORET_TYPE void do_exit(long code)
|
||||
exit_sem(tsk);
|
||||
__exit_files(tsk);
|
||||
__exit_fs(tsk);
|
||||
exit_task_namespaces(tsk);
|
||||
exit_thread();
|
||||
cpuset_exit(tsk);
|
||||
exit_keys(tsk);
|
||||
@ -935,6 +934,7 @@ fastcall NORET_TYPE void do_exit(long code)
|
||||
tsk->exit_code = code;
|
||||
proc_exit_connector(tsk);
|
||||
exit_notify(tsk);
|
||||
exit_task_namespaces(tsk);
|
||||
#ifdef CONFIG_NUMA
|
||||
mpol_free(tsk->mempolicy);
|
||||
tsk->mempolicy = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user