]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
xfrm: state: fix sparse warnings on xfrm_state_hold_rcu
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 9 Mar 2026 10:32:34 +0000 (11:32 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 12 Mar 2026 06:14:56 +0000 (07:14 +0100)
commit9f455aac17db0aa1486c94dd2c231353ebc9d8bc
tree1dfda296b2d766404a2b910c787842dc559ca9e5
parent0b352f83cabfefdaafa806d6471f0eca117dc7d5
xfrm: state: fix sparse warnings on xfrm_state_hold_rcu

In all callers, x is not an __rcu pointer. We can drop the annotation to
avoid sparse warnings:

net/xfrm/xfrm_state.c:58:39: warning: incorrect type in argument 1 (different address spaces)
net/xfrm/xfrm_state.c:58:39:    expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39:    got struct refcount_struct [noderef] __rcu *
net/xfrm/xfrm_state.c:1166:42: warning: incorrect type in argument 1 (different address spaces)
net/xfrm/xfrm_state.c:1166:42:    expected struct xfrm_state [noderef] __rcu *x
net/xfrm/xfrm_state.c:1166:42:    got struct xfrm_state *[assigned] x
(repeated for each caller)

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c