[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201207224903.GA4117703@ZenIV.linux.org.uk>
Date: Mon, 7 Dec 2020 22:49:03 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
criu@...nvz.org, bpf@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Christian Brauner <christian.brauner@...ntu.com>,
Oleg Nesterov <oleg@...hat.com>,
Cyrill Gorcunov <gorcunov@...il.com>,
Jann Horn <jann@...jh.net>, Kees Cook <keescook@...omium.org>,
Daniel P . Berrangé <berrange@...hat.com>,
Jeff Layton <jlayton@...hat.com>,
Miklos Szeredi <miklos@...redi.hu>,
Matthew Wilcox <willy@...radead.org>,
"J. Bruce Fields" <bfields@...ldses.org>,
Trond Myklebust <trond.myklebust@...merspace.com>,
Chris Wright <chrisw@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>
Subject: Re: [PATCH v2 09/24] file: Replace fcheck_files with
files_lookup_fd_rcu
On Mon, Dec 07, 2020 at 10:46:57PM +0000, Al Viro wrote:
> On Fri, Nov 20, 2020 at 05:14:26PM -0600, Eric W. Biederman wrote:
>
> > /*
> > * Check whether the specified fd has an open file.
> > */
> > -#define fcheck(fd) fcheck_files(current->files, fd)
> > +#define fcheck(fd) files_lookup_fd_rcu(current->files, fd)
>
> Huh?
> fs/file.c:1113: file = fcheck(oldfd);
> dup3(), under ->file_lock, no rcu_read_lock() in sight
>
> fs/locks.c:2548: f = fcheck(fd);
> fcntl_setlk(), ditto
>
> fs/locks.c:2679: f = fcheck(fd);
> fcntl_setlk64(), ditto
>
> fs/notify/dnotify/dnotify.c:330: f = fcheck(fd);
> fcntl_dirnotify(); this one _is_ under rcu_read_lock().
>
>
> IOW, unless I've missed something earlier in the series, this is wrong.
I have missed something, all right. Ignore that comment...
Powered by blists - more mailing lists