public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Ming Lei <ming.lei@redhat.com>, Hannes Reinecke <hare@suse.de>,
	John Garry <john.garry@huawei.com>
Subject: Re: [PATCH] blk-mq: Fix two racy hctx->tags->rqs[] assignments
Date: Sat, 24 Apr 2021 13:33:21 -0600	[thread overview]
Message-ID: <661306fd-0adc-dff7-c79b-f4be8feba73d@kernel.dk> (raw)
In-Reply-To: <20210423200109.18430-1-bvanassche@acm.org>

On 4/23/21 2:01 PM, Bart Van Assche wrote:
> hctx->tags->rqs[] must be cleared before releasing a request tag because
> otherwise clearing that pointer races with the following assignment in
> blk_mq_get_driver_tag():
> 
> 	rcu_assign_pointer(hctx->tags->rqs[rq->tag], rq);

Looks good to me. Applied, and added:

Fixes: 5ba3f5a6ca7e ("blk-mq: Fix races between iterating over requests and freeing requests")

which was missing.

-- 
Jens Axboe


  reply	other threads:[~2021-04-24 19:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 20:01 [PATCH] blk-mq: Fix two racy hctx->tags->rqs[] assignments Bart Van Assche
2021-04-24 19:33 ` Jens Axboe [this message]
2021-04-25  0:13 ` Ming Lei

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=661306fd-0adc-dff7-c79b-f4be8feba73d@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=john.garry@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox