diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 01666979beac..de5c16c6b6ec 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1696,7 +1696,12 @@ asmlinkage long sys_unshare(unsigned long unshare_flags) | |||
1696 | CLONE_NEWNET)) | 1696 | CLONE_NEWNET)) |
1697 | goto bad_unshare_out; | 1697 | goto bad_unshare_out; |
1698 | 1698 | ||
1699 | if (unshare_flags & CLONE_SYSVSEM) | 1699 | /* |
1700 | * CLONE_NEWIPC must also detach from the undolist: after switching | ||
1701 | * to a new ipc namespace, the semaphore arrays from the old | ||
1702 | * namespace are unreachable. | ||
1703 | */ | ||
1704 | if (unshare_flags & (CLONE_NEWIPC|CLONE_SYSVSEM)) | ||
1700 | do_sysvsem = 1; | 1705 | do_sysvsem = 1; |
1701 | if ((err = unshare_thread(unshare_flags))) | 1706 | if ((err = unshare_thread(unshare_flags))) |
1702 | goto bad_unshare_out; | 1707 | goto bad_unshare_out; |