[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200507190503.GA15998@rabbit.intern.cm-ag>
Date: Thu, 7 May 2020 21:05:03 +0200
From: Max Kellermann <mk@...all.com>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Max Kellermann <mk@...all.com>, axboe@...nel.dk,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH] fs/io_uring: fix O_PATH fds in openat, openat2, statx
On 2020/05/07 21:01, Al Viro <viro@...iv.linux.org.uk> wrote:
> On Thu, May 07, 2020 at 08:57:25PM +0200, Max Kellermann wrote:
> > If an operation's flag `needs_file` is set, the function
> > io_req_set_file() calls io_file_get() to obtain a `struct file*`.
> >
> > This fails for `O_PATH` file descriptors, because those have no
> > `struct file*`
>
> O_PATH descriptors most certainly *do* have that. What the hell
> are you talking about?
Oh, then my patch description (and my understanding of the root
problem) is wrong. In my debugging session, io_file_get() on that fd
returned NULL, so I assumed O_PATH doesn't have that, but maybe there
are other reasons.
In any case, with a "real" fd, io_uring openat() succeeds, and my
patch makes the problem with O_PATH go away.
I guess I need to learn more about what happens inside io_file_get().
Max
Powered by blists - more mailing lists