Skip to content

Commit

Permalink
Merge tags 'free-mq_sysctls-for-v5.19' and 'ptrace_unfreeze_fix-for-v…
Browse files Browse the repository at this point in the history
…5.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()
  • Loading branch information
Linus Torvalds committed Jul 11, 2022
3 parents 8e59a6a + db7cfc3 + 3418357 commit 23458ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ipc/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,17 @@ static struct ipc_namespace *create_ipc_ns(struct user_namespace *user_ns,
goto fail_put;

if (!setup_ipc_sysctls(ns))
goto fail_put;
goto fail_mq;

sem_init_ns(ns);
msg_init_ns(ns);
shm_init_ns(ns);

return ns;

fail_mq:
retire_mq_sysctls(ns);

fail_put:
put_user_ns(ns->user_ns);
ns_free_inum(&ns->ns);
Expand Down

0 comments on commit 23458ac

Please sign in to comment.