[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <171413885096.211722.564458609126458139.b4-ty@kernel.dk>
Date: Fri, 26 Apr 2024 07:40:50 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linke li <lilinke99@...com>
Cc: xujianhao01@...il.com, Andrew Morton <akpm@...ux-foundation.org>,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sbitmap: use READ_ONCE to access map->word
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
Powered by blists - more mailing lists