From: Roman Penyaev <rpenyaev@suse.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-block-owner@vger.kernel.org
Subject: Re: [PATCH 1/1] io_uring: fix infinite wait in khread_park() on io_finish_async()
Date: Tue, 14 May 2019 11:27:38 +0200 [thread overview]
Message-ID: <849f15736e98ea04106924349260aa61@suse.de> (raw)
In-Reply-To: <18e65f75e5a3972bec42d830ac397501@suse.de>
On 2019-05-14 11:17, Roman Penyaev wrote:
> I see. Do you think it makes sense to fix this is kthread? With
> something
> as the following:
>
> diff --git a/kernel/kthread.c b/kernel/kthread.c
> index be4e8795561a..191f8be5c9e0 100644
> --- a/kernel/kthread.c
> +++ b/kernel/kthread.c
> @@ -472,6 +472,10 @@ void kthread_unpark(struct task_struct *k)
> {
> struct kthread *kthread = to_kthread(k);
>
> + if (!__kthread_should_park(k))
> + /* Nop if thread was never parked */
> + break;
return of course, not break.
--
Roman
prev parent reply other threads:[~2019-05-14 9:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-13 18:20 [PATCH 1/1] io_uring: fix infinite wait in khread_park() on io_finish_async() Roman Penyaev
2019-05-13 18:25 ` Roman Penyaev
2019-05-13 18:52 ` Jens Axboe
2019-05-14 9:17 ` Roman Penyaev
2019-05-14 9:27 ` Roman Penyaev [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=849f15736e98ea04106924349260aa61@suse.de \
--to=rpenyaev@suse.de \
--cc=axboe@kernel.dk \
--cc=linux-block-owner@vger.kernel.org \
--cc=linux-block@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).