public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>, [email protected]
Subject: Re: [PATCH 1/1] io_uring: fix racy REQ_F_LINK_TIMEOUT clearing
Date: Tue, 20 Oct 2020 08:10:39 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <5a8d5c3e3445a2f06070d827f15b4a04fac82076.1603120597.git.asml.silence@gmail.com>

On 10/19/20 9:39 AM, Pavel Begunkov wrote:
> io_link_timeout_fn() removes REQ_F_LINK_TIMEOUT from the link head's
> flags, it's not atomic and may race with what the head is doing.
> 
> If io_link_timeout_fn() doesn't clear the flag, as forced by this patch,
> then it may happen that for "req -> link_timeout1 -> link_timeout2",
> __io_kill_linked_timeout() would find link_timeout2 and try to cancel
> it, so miscounting references. Teach it to ignore such double timeouts
> by marking the active one with a new flag in io_prep_linked_timeout().

Applied, thanks.

-- 
Jens Axboe


      reply	other threads:[~2020-10-20 14:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 15:39 [PATCH 1/1] io_uring: fix racy REQ_F_LINK_TIMEOUT clearing Pavel Begunkov
2020-10-20 14:10 ` 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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