xfrm: do not call rcu_read_unlock when afinfo is NULL in xfrm_get_tos
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: f5e2bb4f ("xfrm: policy: xfrm_get_tos cannot fail") Signed-off-by: NXin Long <lucien.xin@gmail.com> Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
Showing
想要评论请 注册 或 登录