public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Christian Brauner <christian@brauner.io>
Cc: jannh@google.com, viro@zeniv.linux.org.uk,
	torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
	akpm@linux-foundation.org, arnd@arndb.de, arunks@codeaurora.org,
	cyphar@cyphar.com, dhowells@redhat.com, ebiederm@xmission.com,
	elena.reshetova@intel.com, guro@fb.com, keescook@chromium.org,
	luto@amacapital.net, luto@kernel.org, mhocko@suse.com,
	mingo@kernel.org, mtk.manpages@gmail.com, namit@vmware.com,
	peterz@infradead.org, riel@surriel.com, shakeelb@google.com,
	syzkaller-bugs@googlegroups.com, tglx@linutronix.de,
	wad@chromium.org,
	syzbot+3286e58549edc479faae@syzkaller.appspotmail.com
Subject: Re: [PATCH] fork: do not release lock that wasn't taken
Date: Fri, 10 May 2019 17:36:47 +0200	[thread overview]
Message-ID: <20190510153647.GB21421@redhat.com> (raw)
In-Reply-To: <20190510104913.27143-1-christian@brauner.io>

On 05/10, Christian Brauner wrote:
>
> @@ -2102,7 +2102,7 @@ static __latent_entropy struct task_struct *copy_process(
>  	 */
>  	retval = cgroup_can_fork(p);
>  	if (retval)
> -		goto bad_fork_put_pidfd;
> +		goto bad_fork_cgroup_threadgroup_change_end;
>
>  	/*
>  	 * From this point on we must avoid any synchronous user-space
> @@ -2217,11 +2217,12 @@ static __latent_entropy struct task_struct *copy_process(
>  	spin_unlock(&current->sighand->siglock);
>  	write_unlock_irq(&tasklist_lock);
>  	cgroup_cancel_fork(p);
> +bad_fork_cgroup_threadgroup_change_end:
> +	cgroup_threadgroup_change_end(current);
>  bad_fork_put_pidfd:
>  	if (clone_flags & CLONE_PIDFD)
>  		ksys_close(pidfd);
>  bad_fork_free_pid:
> -	cgroup_threadgroup_change_end(current);
>  	if (pid != &init_struct_pid)
>  		free_pid(pid);
>  bad_fork_cleanup_thread:

Reviewed-by: Oleg Nesterov <oleg@redhat.com>


  parent reply	other threads:[~2019-05-10 15:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 10:49 [PATCH] fork: do not release lock that wasn't taken Christian Brauner
2019-05-10 10:50 ` Christian Brauner
2019-05-10 12:25   ` Christian Brauner
2019-05-10 15:36 ` Oleg Nesterov [this message]
2019-05-10 19:14   ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190510153647.GB21421@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=arunks@codeaurora.org \
    --cc=christian@brauner.io \
    --cc=cyphar@cyphar.com \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=elena.reshetova@intel.com \
    --cc=guro@fb.com \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=namit@vmware.com \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=shakeelb@google.com \
    --cc=syzbot+3286e58549edc479faae@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wad@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox