[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <871q5rdnae.ffs@tglx>
Date: Fri, 24 May 2024 21:26:17 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Breno Leitao <leitao@...ian.org>, Andrew Morton <akpm@...ux-foundation.org>
Cc: paulmck@...nel.org, "open list:DEBUGOBJECTS:"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] debugobjects: Fix potential data race in
debug_objects_maxchain
On Thu, May 09 2024 at 04:06, Breno Leitao wrote:
> - if (cnt > debug_objects_maxchain)
> - debug_objects_maxchain = cnt;
> + if (cnt > READ_ONCE(debug_objects_maxchain))
> + WRITE_ONCE(debug_objects_maxchain, cnt);
The data race is actually harmless as this is just used for debugfs
statistics.
I'm pretty sure that the rest of these debug variables are racy as
well. Can we please annotate all of them without waiting for KCSAN to
detect them one by one?
Thanks,
tglx
Powered by blists - more mailing lists