]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfrm: annotate data-races around xfrm_policy_count[] and xfrm_policy_default[]
authorEric Dumazet <edumazet@google.com>
Fri, 12 Jun 2026 05:56:34 +0000 (05:56 +0000)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 17 Jun 2026 09:17:26 +0000 (11:17 +0200)
commit68de007d5ac9df0e3f4f187a179c5c842bb5a2be
tree735a686fe64575f85331c0c8b078390c39c90277
parentddd3d0132920319ac426e12456013eadbae67e15
xfrm: annotate data-races around xfrm_policy_count[] and xfrm_policy_default[]

KCSAN reported a data race involving net->xfrm.policy_count access.

Add missing READ_ONCE()/WRITE_ONCE() annotations on
xfrm_policy_count and xfrm_policy_default.

Fixes: 2518c7c2b3d7 ("[XFRM]: Hash policies when non-prefixed.")
Reported-by: syzbot+d85ba1c732720b9a4097@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/6a2b9e96.99669fcc.12a77b.0006.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_user.c