From: Jens Axboe <axboe@kernel.dk>
To: Hao Xu <haoxu@linux.alibaba.com>, io-uring@vger.kernel.org
Cc: syzbot+21e6887c0be14181206d@syzkaller.appspotmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH v2 2/2] io_uring: ensure task_work gets run as part of cancelations
Date: Fri, 10 Dec 2021 06:45:55 -0700 [thread overview]
Message-ID: <deb94fec-ec14-7f9a-2e38-6bbdaac1178f@kernel.dk> (raw)
In-Reply-To: <281d4248-676e-efc5-d95a-d848cbf0df41@linux.alibaba.com>
On 12/10/21 12:31 AM, Hao Xu wrote:
>
> 在 2021/12/10 下午12:22, Jens Axboe 写道:
>> On 12/9/21 8:29 PM, Hao Xu wrote:
>>> 在 2021/12/10 上午12:16, Jens Axboe 写道:
>>>> If we successfully cancel a work item but that work item needs to be
>>>> processed through task_work, then we can be sleeping uninterruptibly
>>>> in io_uring_cancel_generic() and never process it. Hence we don't
>>>> make forward progress and we end up with an uninterruptible sleep
>>>> warning.
>>>>
>>>> Add the waitqueue earlier to ensure that any wakeups from cancelations
>>>> are seen, and switch to using uninterruptible sleep so that postponed
>>> ^ typo
>> Not really a typo, but should be killed from v2 for sure. I'll do that.
>>
> Don't know why the ^ char doesn't align with 'uninterruptible' ... here
> I mean 'uninterruptible' is a typo
Gotcha, I guess the end result is the same as I killed the section on
moving the sleep.
--
Jens Axboe
prev parent reply other threads:[~2021-12-10 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 15:59 [PATCHSET 0/2] Cancelation fixes Jens Axboe
2021-12-09 15:59 ` [PATCH 1/2] io_uring: check tctx->in_idle when decrementing inflight_tracked Jens Axboe
2021-12-10 7:21 ` Hao Xu
2021-12-10 13:47 ` Jens Axboe
2021-12-09 15:59 ` [PATCH 2/2] io_uring: ensure task_work gets run as part of cancelations Jens Axboe
2021-12-09 16:16 ` [PATCH v2 " Jens Axboe
2021-12-10 3:29 ` Hao Xu
2021-12-10 4:22 ` Jens Axboe
2021-12-10 7:31 ` Hao Xu
2021-12-10 13:45 ` Jens Axboe [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=deb94fec-ec14-7f9a-2e38-6bbdaac1178f@kernel.dk \
--to=axboe@kernel.dk \
--cc=haoxu@linux.alibaba.com \
--cc=io-uring@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+21e6887c0be14181206d@syzkaller.appspotmail.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.