]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
af_unix: Annotate data-race of gc_in_progress in wait_for_unix_gc().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Jan 2024 17:08:52 +0000 (09:08 -0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:23 +0000 (18:19 -0400)
commitdebbb99874395c9fe0089292da9acac7b37f0433
tree94183e93cdd566dec02297eab7ab276266988ff5
parenta9800dc6cf4a6b957940c7f9a9d5812086deba20
af_unix: Annotate data-race of gc_in_progress in wait_for_unix_gc().

[ Upstream commit 31e03207119a535d0b0e3b3a7f91983aeb2cb14d ]

gc_in_progress is changed under spin_lock(&unix_gc_lock),
but wait_for_unix_gc() reads it locklessly.

Let's use READ_ONCE().

Fixes: 5f23b734963e ("net: Fix soft lockups/OOM issues w/ unix garbage collector")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20240123170856.41348-2-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/unix/garbage.c