From: Max Kellermann <mk@cm4all.com>
To: axboe@kernel.dk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] fs/io_uring: fix O_PATH fds in openat, openat2, statx
Date: Fri, 8 May 2020 08:40:56 +0200 [thread overview]
Message-ID: <20200508064056.GA21129@rabbit.intern.cm-ag> (raw)
In-Reply-To: <20200508063846.21067-1-mk@cm4all.com>
On 2020/05/08 08:38, Max Kellermann <mk@cm4all.com> wrote:
> This fails for `O_PATH` file descriptors, because io_file_get() calls
> fget(), which rejects `O_PATH` file descriptors. To support `O_PATH`,
> fdget_raw() must be used (like path_init() in `fs/namei.c` does).
> This rejection causes io_req_set_file() to throw `-EBADF`. This
> breaks the operations `openat`, `openat2` and `statx`, where `O_PATH`
> file descriptors are commonly used.
Code is the same as in v1, but I investigated the root cause of the
problem and updated the patch description.
Jens, I believe this should be a separate trivial commit just removing
those flags, to allow Greg to backport this to stable easily.
Max
next prev parent reply other threads:[~2020-05-08 6:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 6:38 [PATCH v2 1/2] fs/io_uring: fix O_PATH fds in openat, openat2, statx Max Kellermann
2020-05-08 6:38 ` [PATCH v2 2/2] fs/io_uring: remove unused flag fd_non_neg Max Kellermann
2020-05-08 6:40 ` Max Kellermann [this message]
2020-05-08 15:29 ` [PATCH v2 1/2] fs/io_uring: fix O_PATH fds in openat, openat2, statx Jens Axboe
2020-05-09 12:30 ` Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200508064056.GA21129@rabbit.intern.cm-ag \
--to=mk@cm4all.com \
--cc=axboe@kernel.dk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).