From: Pavel Begunkov <asml.silence@gmail.com>
To: Joseph Qi <joseph.qi@linux.alibaba.com>, Jens Axboe <axboe@kernel.dk>
Cc: io-uring@vger.kernel.org,
Xiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
Subject: Re: [PATCH] io_uring: fix NULL pointer dereference for async cancel close
Date: Tue, 19 Jan 2021 02:38:23 +0000 [thread overview]
Message-ID: <164dff2a-7f23-4baf-bcb5-975b1f5edf9b@gmail.com> (raw)
In-Reply-To: <58b25063-7047-e656-18df-c1240fab3f8d@linux.alibaba.com>
On 19/01/2021 01:58, Joseph Qi wrote:
>> Hmm, I hastened, for files we need IO_WQ_WORK_FILES,
>> +IO_WQ_WORK_BLKCG for same reasons. needs_file would make
>> it to grab a struct file, that is wrong.
>> Probably worked out because it just grabbed fd=0/stdin.
>>
>
> I think IO_WQ_WORK_FILES can work since it will acquire
> files when initialize async cancel request.
That the one controlling files in the first place, need_file
just happened to grab them submission.
> Don't quite understand why we should have IO_WQ_WORK_BLKCG.
Because it's set for IORING_OP_CLOSE, and similar situation
may happen but with async_cancel from io-wq.
Actually, it's even nastier than that, and neither of io_op_def
flags would work because for io-wq case you can end up doing
close() with different from original files. I'll think how it
can be done tomorrow.
--
Pavel Begunkov
next prev parent reply other threads:[~2021-01-19 2:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 9:50 [PATCH] io_uring: fix NULL pointer dereference for async cancel close Joseph Qi
2021-01-18 12:23 ` Pavel Begunkov
2021-01-18 15:08 ` Pavel Begunkov
2021-01-19 1:58 ` Joseph Qi
2021-01-19 2:38 ` Pavel Begunkov [this message]
2021-01-19 8:00 ` Joseph Qi
2021-01-19 11:45 ` Pavel Begunkov
2021-01-19 13:12 ` Joseph Qi
2021-01-19 13:39 ` Pavel Begunkov
2021-01-19 16:37 ` Pavel Begunkov
2021-01-19 2:08 ` Joseph Qi
2021-01-19 18:01 ` Jens Axboe
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=164dff2a-7f23-4baf-bcb5-975b1f5edf9b@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=xiaoguang.wang@linux.alibaba.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.