]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
xfrm: state: fix sparse warnings around XFRM_STATE_INSERT
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 9 Mar 2026 10:32:36 +0000 (11:32 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 12 Mar 2026 06:15:19 +0000 (07:15 +0100)
commit55b5bc03148b26ce8156bc47b637a7337aa7d257
treee3fbd77c35f77bec780103a1c8d3a98a5042d9fc
parente2f845f672782b2522062cf1c9aad774276250d7
xfrm: state: fix sparse warnings around XFRM_STATE_INSERT

We're under xfrm_state_lock in all those cases, use
xfrm_state_deref_prot(state_by*) to avoid sparse warnings:

net/xfrm/xfrm_state.c:2597:25: warning: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2597:25: warning: incorrect type in argument 2 (different address spaces)
net/xfrm/xfrm_state.c:2597:25:    expected struct hlist_head *h
net/xfrm/xfrm_state.c:2597:25:    got struct hlist_head [noderef] __rcu *

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