On Thu, Nov 17, 2016 at 01:21:46PM +0100, Florian Westphal wrote:
> if we succeed grabbing the refcount, then
> if (err && !xfrm_pol_hold_rcu)
>
> will evaluate to false so this hits last else branch which then
> sets policy to ERR_PTR(0).
>
> Fixes: ae33786f73a7ce ("xfrm: policy: only use rcu
if we succeed grabbing the refcount, then
if (err && !xfrm_pol_hold_rcu)
will evaluate to false so this hits last else branch which then
sets policy to ERR_PTR(0).
Fixes: ae33786f73a7ce ("xfrm: policy: only use rcu in xfrm_sk_policy_lookup")
Reported-by: Nicolas Dichtel
Tested-by: Nicolas Dich