linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linke li <lilinke99@qq.com>
Cc: xujianhao01@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
	 linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sbitmap: use READ_ONCE to access map->word
Date: Fri, 26 Apr 2024 07:40:50 -0600	[thread overview]
Message-ID: <171413885096.211722.564458609126458139.b4-ty@kernel.dk> (raw)
In-Reply-To: <tencent_0B517C25E519D3D002194E8445E86C04AD0A@qq.com>


On Fri, 26 Apr 2024 18:34:44 +0800, linke li wrote:
> In __sbitmap_queue_get_batch(), map->word is read several times, and
> update atomically using atomic_long_try_cmpxchg(). But the first two read
> of map->word is not protected.
> 
> This patch moves the statement val = READ_ONCE(map->word) forward,
> eliminating unprotected accesses to map->word within the function.
> It is aimed at reducing the number of benign races reported by KCSAN in
> order to focus future debugging effort on harmful races.
> 
> [...]

Applied, thanks!

[1/1] sbitmap: use READ_ONCE to access map->word
      commit: 6ad0d7e0f4b68f87a98ea2b239123b7d865df86b

Best regards,
-- 
Jens Axboe




      reply	other threads:[~2024-04-26 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 10:34 [PATCH] sbitmap: use READ_ONCE to access map->word linke li
2024-04-26 13:40 ` 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=171413885096.211722.564458609126458139.b4-ty@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=akpm@linux-foundation.org \
    --cc=lilinke99@qq.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xujianhao01@gmail.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;
as well as URLs for NNTP newsgroup(s).