All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: ming.lei@redhat.com
Cc: linux-block@vger.kernel.org, jack@suse.cz, yukuai3@huawei.com
Subject: Re: [PATCH] blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx
Date: Mon, 23 May 2022 06:28:50 -0600	[thread overview]
Message-ID: <165330893019.361005.16959517425064628353.b4-ty@kernel.dk> (raw)
In-Reply-To: <20220522122350.743103-1-ming.lei@redhat.com>

On Sun, 22 May 2022 20:23:50 +0800, Ming Lei wrote:
> blk_mq_run_hw_queues() could be run when there isn't queued request and
> after queue is cleaned up, at that time tagset is freed, because tagset
> lifetime is covered by driver, and often freed after blk_cleanup_queue()
> returns.
> 
> So don't touch ->tagset for figuring out current default hctx by the mapping
> built in request queue, so use-after-free on tagset can be avoided. Meantime
> this way should be fast than retrieving mapping from tagset.
> 
> [...]

Applied, thanks!

[1/1] blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx
      commit: 5d05426e2d5fd7df8afc866b78c36b37b00188b7

Best regards,
-- 
Jens Axboe



      parent reply	other threads:[~2022-05-23 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-22 12:23 [PATCH] blk-mq: don't touch ->tagset in blk_mq_get_sq_hctx Ming Lei
2022-05-23 10:00 ` Jan Kara
2022-05-23 12:28 ` 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=165330893019.361005.16959517425064628353.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=yukuai3@huawei.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.