Re: [PATCH 2/5] seccomp: Introduce addfd ioctl to seccomp user notifier

From
Al Viro <viro@zeniv.linux.org.uk>
Date
2020-05-25 00:39:26
Also in
lkml
Reply to
Sargun Dhillon, 2020-05-25
On Sun, May 24, 2020 at 05:27:58PM -0700, Sargun Dhillon wrote:
quoted
        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?
Thread (18 messages) 18 messages, 4 authors, last reply 2020-05-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help