Skip to content

Commit 23458ac

Browse files
committed
Merge tags 'free-mq_sysctls-for-v5.19' and 'ptrace_unfreeze_fix-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull ipc namespace fix from Eric Biederman: "This fixes a bug with error handling if ipc creation fails that was reported by syzbot" For completeness, this also pulls the ptrace_unfreeze_fix tag that contains the original version of one of the hotfixes that I manually applied earlier so that it would be fixed in rc6. * tag 'free-mq_sysctls-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: ipc: Free mq_sysctls if ipc namespace creation failed * tag 'ptrace_unfreeze_fix-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
3 parents 8e59a6a + db7cfc3 + 3418357 commit 23458ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ipc/namespace.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,17 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
6464
goto fail_put;
6565

6666
if (!setup_ipc_sysctls(ns))
67-
goto fail_put;
67+
goto fail_mq;
6868

6969
sem_init_ns(ns);
7070
msg_init_ns(ns);
7171
shm_init_ns(ns);
7272

7373
return ns;
7474

75+
fail_mq:
76+
retire_mq_sysctls(ns);
77+
7578
fail_put:
7679
put_user_ns(ns->user_ns);
7780
ns_free_inum(&ns->ns);

0 commit comments

Comments
 (0)