Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Sasha Levin <sashal@kernel.org>
Cc: axboe@kernel.dk, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] io_uring: use signal based task_work running" failed to apply to 5.7-stable tree
Date: Sun, 5 Jul 2020 16:08:33 +0200	[thread overview]
Message-ID: <20200705140833.GA1299492@kroah.com> (raw)
In-Reply-To: <20200705134910.GJ2722994@sasha-vm>

On Sun, Jul 05, 2020 at 09:49:10AM -0400, Sasha Levin wrote:
> On Sun, Jul 05, 2020 at 01:26:56PM +0200, gregkh@linuxfoundation.org wrote:
> > 
> > The patch below does not apply to the 5.7-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@vger.kernel.org>.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> > ------------------ original commit in Linus's tree ------------------
> > 
> > > From ce593a6c480a22acba08795be313c0c6d49dd35d Mon Sep 17 00:00:00 2001
> > From: Jens Axboe <axboe@kernel.dk>
> > Date: Tue, 30 Jun 2020 12:39:05 -0600
> > Subject: [PATCH] io_uring: use signal based task_work running
> > 
> > Since 5.7, we've been using task_work to trigger async running of
> > requests in the context of the original task. This generally works
> > great, but there's a case where if the task is currently blocked
> > in the kernel waiting on a condition to become true, it won't process
> > task_work. Even though the task is woken, it just checks whatever
> > condition it's waiting on, and goes back to sleep if it's still false.
> > 
> > This is a problem if that very condition only becomes true when that
> > task_work is run. An example of that is the task registering an eventfd
> > with io_uring, and it's now blocked waiting on an eventfd read. That
> > read could depend on a completion event, and that completion event
> > won't get trigged until task_work has been run.
> > 
> > Use the TWA_SIGNAL notification for task_work, so that we ensure that
> > the task always runs the work when queued.
> > 
> > Cc: stable@vger.kernel.org # v5.7
> > Signed-off-by: Jens Axboe <axboe@kernel.dk>
> 
> This patch depends on e91b48162332 ("task_work: teach task_work_add() to
> do signal_wake_up()"), I've queued both for 5.7.

Great, thanks for adding that.

greg k-h

      reply	other threads:[~2020-07-05 14:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-05 11:26 FAILED: patch "[PATCH] io_uring: use signal based task_work running" failed to apply to 5.7-stable tree gregkh
2020-07-05 13:49 ` Sasha Levin
2020-07-05 14:08   ` Greg KH [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=20200705140833.GA1299492@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=axboe@kernel.dk \
    --cc=sashal@kernel.org \
    --cc=stable@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