All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, hch@infradead.org
Subject: Re: [PATCH 2/2] block: fix double bio queue when merging in cached request path
Date: Fri, 3 Dec 2021 10:36:02 +0800	[thread overview]
Message-ID: <YamCkkHUDluZLDxE@T590> (raw)
In-Reply-To: <20211202194741.810957-3-axboe@kernel.dk>

On Thu, Dec 02, 2021 at 12:47:41PM -0700, Jens Axboe wrote:
> When we attempt to merge off the cached request path, we return NULL
> if successful. This makes the caller believe that it's should allocate
> a new request, and hence we end up with the bio both merged and associated
> with a new request. This, predictably, leads to all sorts of crashes.
> 
> Pass in a pointer to the bio pointer, and clear it for the merge case.
> Then the caller knows that the bio is already queued, and no new requests
> need to get allocated.
> 
> Fixes: 5b13bc8a3fd5 ("blk-mq: cleanup request allocation")
> Signed-off-by: Jens Axboe <axboe@kernel.dk>

Io hang in io_uring workload can't be triggered any more with this
patch:

Reviewed-by: Ming Lei <ming.lei@redhat.com>


-- 
Ming


  reply	other threads:[~2021-12-03  2:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 19:47 [PATCH 0/2] Fix bio merge off cached request path Jens Axboe
2021-12-02 19:47 ` [PATCH 1/2] block: get rid of useless goto and label in blk_mq_get_new_requests() Jens Axboe
2021-12-03  6:53   ` Christoph Hellwig
2021-12-02 19:47 ` [PATCH 2/2] block: fix double bio queue when merging in cached request path Jens Axboe
2021-12-03  2:36   ` Ming Lei [this message]
2021-12-03  6:54   ` Christoph Hellwig

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=YamCkkHUDluZLDxE@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.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 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.