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: <20190729145408.ro2loxchmbtfk6h6@brauner.io>
Date:   Mon, 29 Jul 2019 16:54:10 +0200
From:   Christian Brauner <christian@...uner.io>
To:     Oleg Nesterov <oleg@...hat.com>
Cc:     linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
        arnd@...db.de, ebiederm@...ssion.com, keescook@...omium.org,
        joel@...lfernandes.org, tglx@...utronix.de, tj@...nel.org,
        dhowells@...hat.com, jannh@...gle.com, luto@...nel.org,
        akpm@...ux-foundation.org, cyphar@...har.com,
        viro@...iv.linux.org.uk, kernel-team@...roid.com
Subject: Re: [PATCH v3 1/2] pidfd: add P_PIDFD to waitid()

On Mon, Jul 29, 2019 at 04:27:44PM +0200, Oleg Nesterov wrote:
> On 07/28, Christian Brauner wrote:
> >
> > +static struct pid *pidfd_get_pid(unsigned int fd)
> > +{
> > +	struct fd f;
> > +	struct pid *pid;
> > +
> > +	f = fdget(fd);
> > +	if (!f.file)
> > +		return ERR_PTR(-EBADF);
> > +
> > +	pid = pidfd_pid(f.file);
> > +	if (!IS_ERR(pid))
> > +		get_pid(pid);
> > +
> > +	fdput(f);
> > +	return pid;
> > +}
> 
> Agreed, this looks better than the previous version.
> 
> FWIW,
> 
> Reviewed-by: Oleg Nesterov <oleg@...hat.com>

Thanks Oleg!
Christian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ