mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Shuo Qin <23159100078@stu.xidian.edu.cn>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <mkp@kernel.org>
Cc: linux-scsi@vger.kernel.org, Ming Lei <ming.lei@redhat.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Bin Yu <byu@xidian.edu.cn>, Cheng Wen <wencheng@xidian.edu.cn>,
	XinCheng Wang <26031212453@stu.xidian.edu.cn>
Subject: Re: [PATCH] scsi: core: Protect host_busy reads against tag set teardown
Date: Wed, 2 Dec 2026 07:07:37 -0800	[thread overview]
Message-ID: <b47251c7-dcc1-41c4-81b0-db03f5e2fcc1@acm.org> (raw)
In-Reply-To: <20261202120443.15341-1-23159100078@stu.xidian.edu.cn>

On 12/2/26 4:04 AM, Shuo Qin wrote:
> show_host_busy() can race with SCSI host removal. scsi_remove_host()
> drops the host's tagset_refcnt reference and waits for the tag set to
> be freed before unregistering shost_dev. During this interval the
> host_busy attribute is still accessible, but its callback does not
> hold a tag set reference while calling scsi_host_busy().

Why has the approach of this patch been selected instead of adding a
kref_get() call before scsi_remove_host() and a kref_put() call after
shost_busy has been removed?

Thanks,

Bart.

      reply	other threads:[~2026-12-02 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 12:04 Shuo Qin
2026-12-02 15:07 ` Bart Van Assche [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=b47251c7-dcc1-41c4-81b0-db03f5e2fcc1@acm.org \
    --to=bvanassche@acm.org \
    --cc=23159100078@stu.xidian.edu.cn \
    --cc=26031212453@stu.xidian.edu.cn \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=byu@xidian.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=mkp@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wencheng@xidian.edu.cn \
    /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

all inboxes | Powered by JetHome®