From: Pavel Begunkov <asml.silence@gmail.com>
To: Jens Axboe <axboe@kernel.dk>,
io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: ebiederm@xmission.com
Subject: Re: [PATCH 0/2] don't use pid for request cancellation
Date: Mon, 15 Jun 2020 19:01:29 +0300 [thread overview]
Message-ID: <d710004e-78be-67eb-283b-46949f34ecef@gmail.com> (raw)
In-Reply-To: <9b90fd1d-c60d-523a-b6b5-6c960ae52cc6@kernel.dk>
On 15/06/2020 18:04, Jens Axboe wrote:
> On 6/15/20 1:33 AM, Pavel Begunkov wrote:
>> Cancel requests of an extiting task based on ->task address. As
>> reported by Eric W. Biederman, using pid for this purpose is not
>> right.
>>
>> note: rebased on top of "cancel all" patches
>
> Looks good, and I had the same thought of not grabbing a ref to the
> task for the cancel case where we don't need to dereference it.
I'm afraid of ABA problem, but this particular case @current shouldn't
go away until ->close is finished.
I was thinking about not get_task() it at all, but it would _at least_
need a way to add a callback on exit of tasks using io_uring to
cancel everything related there. Similarly to how it's done for
work->files using ->close().
--
Pavel Begunkov
prev parent reply other threads:[~2020-06-15 16:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 7:33 [PATCH 0/2] don't use pid for request cancellation Pavel Begunkov
2020-06-15 7:33 ` [PATCH 1/2] io_uring: lazy get task Pavel Begunkov
2020-06-15 7:33 ` [PATCH 2/2] io_uring: cancel by ->task not pid Pavel Begunkov
2020-06-15 15:04 ` [PATCH 0/2] don't use pid for request cancellation Jens Axboe
2020-06-15 16:01 ` Pavel Begunkov [this message]
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=d710004e-78be-67eb-283b-46949f34ecef@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=ebiederm@xmission.com \
--cc=io-uring@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