[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200525003919.GC23230@ZenIV.linux.org.uk>
Date: Mon, 25 May 2020 01:39:19 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Sargun Dhillon <sargun@...gun.me>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux Containers <containers@...ts.linux-foundation.org>,
Linux API <linux-api@...r.kernel.org>,
Christian Brauner <christian.brauner@...ntu.com>,
Tycho Andersen <tycho@...ho.ws>,
Kees Cook <keescook@...omium.org>,
Aleksa Sarai <cyphar@...har.com>,
Jeffrey Vander Stoep <jeffv@...gle.com>,
Jann Horn <jannh@...gle.com>, Robert Sesek <rsesek@...gle.com>,
Chris Palmer <palmer@...gle.com>,
Matt Denton <mpdenton@...gle.com>,
Kees Cook <keescook@...gle.com>
Subject: Re: [PATCH 2/5] seccomp: Introduce addfd ioctl to seccomp user
notifier
On Sun, May 24, 2020 at 05:27:58PM -0700, Sargun Dhillon wrote:
> > if (addfd->fd >= 0) {
> > ret = replace_fd(addfd->fd, addfd->file, addfd->flags);
> > } else {
> > ret = get_unused_fd_flags(addfd->flags);
> > if (ret >= 0)
> > fd_install(ret, get_file(addfd->file));
^^^^^^^^
> Wouldn't this result in consumption of reference in one case (fd_install),
> and the fd still having a reference in the replace_fd case?
Powered by blists - more mailing lists