aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/fork.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 8f62b2a0f120..8d932b1c9056 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1861,10 +1861,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
1861 exit_sem(current); 1861 exit_sem(current);
1862 } 1862 }
1863 1863
1864 if (new_nsproxy) { 1864 if (new_nsproxy)
1865 switch_task_namespaces(current, new_nsproxy); 1865 switch_task_namespaces(current, new_nsproxy);
1866 new_nsproxy = NULL;
1867 }
1868 1866
1869 task_lock(current); 1867 task_lock(current);
1870 1868
@@ -1894,9 +1892,6 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
1894 } 1892 }
1895 } 1893 }
1896 1894
1897 if (new_nsproxy)
1898 put_nsproxy(new_nsproxy);
1899
1900bad_unshare_cleanup_cred: 1895bad_unshare_cleanup_cred:
1901 if (new_cred) 1896 if (new_cred)
1902 put_cred(new_cred); 1897 put_cred(new_cred);