Re: [PATCH v2] block/blk-cgroup-rwstat: use data_race() for online test
Tejun Heo <[email protected]> Mon, 3 Aug 2026 06:47:48 -1000
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 03, 2026 at 09:34:00PM +0800, Tao Cui wrote: > From: Tao Cui <[email protected]> > > blkg_rwstat_recursive_sum() reads pos_blkg->online without the queue > lock that its doc comment requires, since blkcg_print_blkgs() stopped > holding it in 56cc24f59c14. Concurrent blkg_create/destroy flips > ->online, tripping KCSAN. The race is harmless (RCU-protected, stale > online only causes minor stat noise). Use data_race() to annotate > the intentional lockless read. > > Also update the stale doc comment that still requires the queue lock. > > Reviewed-by: Yu Kuai <[email protected]> > Signed-off-by: Tao Cui <[email protected]> Acked-by: Tejun Heo <[email protected]> Thanks. -- tejun