Re: [PATCH net] xfrm: do not call rcu_read_unlock when afinfo is NULL in xfrm_get_tos

2018-02-19 Thread Steffen Klassert
On Sat, Feb 17, 2018 at 03:16:22PM +0800, Xin Long wrote: > When xfrm_policy_get_afinfo returns NULL, it will not hold rcu > read lock. In this case, rcu_read_unlock should not be called > in xfrm_get_tos, just like other places where it's calling > xfrm_policy_get_afinfo. > > Fixes: f5e2bb4f5b22

[PATCH net] xfrm: do not call rcu_read_unlock when afinfo is NULL in xfrm_get_tos

2018-02-16 Thread Xin Long
When xfrm_policy_get_afinfo returns NULL, it will not hold rcu read lock. In this case, rcu_read_unlock should not be called in xfrm_get_tos, just like other places where it's calling xfrm_policy_get_afinfo. Fixes: f5e2bb4f5b22 ("xfrm: policy: xfrm_get_tos cannot fail") Signed-off-by: Xin Long --