public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Christoph Hellwig <hch@infradead.org>, Chaohai Chen <wdhh6@aliyun.com>
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: core: Fix missing lock when read async_scan in Scsi_Host
Date: Tue, 03 Mar 2026 11:25:56 -0500	[thread overview]
Message-ID: <617ec22ddeef6efa34066060adfb34083647b075.camel@HansenPartnership.com> (raw)
In-Reply-To: <aab6bMqPdO3rRP-N@infradead.org>

On Tue, 2026-03-03 at 07:12 -0800, Christoph Hellwig wrote:
> No, using a lock to read a single scalar value makes zero sense.
> Just switch to READ_ONCE/WRITE_ONCE to make alpha and KCSAN happy.

Fully agreed here.  Although bool is width undefined, it's bound to be
stored in a naturally aligned architectural type, which will be atomic
for read and write anyway, so the macros will just make sure the
compiler does the right thing.

Regards,

James


      reply	other threads:[~2026-03-03 16:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 12:13 [PATCH] scsi: core: Fix missing lock when read async_scan in Scsi_Host Chaohai Chen
2026-03-02 14:37 ` Bart Van Assche
2026-03-03  8:45 ` Damien Le Moal
2026-03-03  9:20   ` Chaohai Chen
2026-03-03  9:28     ` Damien Le Moal
2026-03-03 15:12 ` Christoph Hellwig
2026-03-03 16:25   ` James Bottomley [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=617ec22ddeef6efa34066060adfb34083647b075.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=wdhh6@aliyun.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