lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190510153647.GB21421@redhat.com>
Date:   Fri, 10 May 2019 17:36:47 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     Christian Brauner <christian@...uner.io>
Cc:     jannh@...gle.com, viro@...iv.linux.org.uk,
        torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
        akpm@...ux-foundation.org, arnd@...db.de, arunks@...eaurora.org,
        cyphar@...har.com, dhowells@...hat.com, ebiederm@...ssion.com,
        elena.reshetova@...el.com, guro@...com, keescook@...omium.org,
        luto@...capital.net, luto@...nel.org, mhocko@...e.com,
        mingo@...nel.org, mtk.manpages@...il.com, namit@...are.com,
        peterz@...radead.org, riel@...riel.com, shakeelb@...gle.com,
        syzkaller-bugs@...glegroups.com, tglx@...utronix.de,
        wad@...omium.org,
        syzbot+3286e58549edc479faae@...kaller.appspotmail.com
Subject: Re: [PATCH] fork: do not release lock that wasn't taken

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@...hat.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ