xfrm: Fix incorrect types in assignment
Subsystems (3)
PATCH v2 1/1 xfrm: Fix incorrect types in assignment
Fix the following sparse warnings:net/xfrm/xfrm_policy.c:1303:22: warning: incorrect type in assignment (different address spaces)
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- net/xfrm/xfrm_policy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/xfrm/xfrm_policy.c +2 -1
@@ -1300,7 +1300,8 @@ static void xfrm_hash_rebuild(struct work_struct *work) } hmask = net->xfrm.policy_bydst[dir].hmask; - odst = net->xfrm.policy_bydst[dir].table; + odst =rcu_dereference_protected (net->xfrm.policy_bydst[dir].table, +lockdep_is_held (&net->xfrm.xfrm_policy_lock));for (i = hmask; i >=0 ; i--) {hlist_for_each_entry_safe (policy, n, odst + i, bydst)hlist_del_rcu (&policy->bydst);
Signature · 1 line
1.8.3.1
Steffen Klassert
maintainerQuoted 6 lines · Yang Li
Fix the following sparse warnings:
net/xfrm/xfrm_policy.c:1303:22: warning: incorrect type in assignment (different address spaces)Reported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>
Please add a proper 'Fixes' tag so that it can be backported into the stable trees.
Thanks!