diff options
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index fd6986634e6f..5bf7e1bfeac7 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -1268,12 +1268,14 @@ static struct xfrm_policy *xfrm_sk_policy_lookup(const struct sock *sk, int dir, | |||
1268 | err = security_xfrm_policy_lookup(pol->security, | 1268 | err = security_xfrm_policy_lookup(pol->security, |
1269 | fl->flowi_secid, | 1269 | fl->flowi_secid, |
1270 | policy_to_flow_dir(dir)); | 1270 | policy_to_flow_dir(dir)); |
1271 | if (!err && !xfrm_pol_hold_rcu(pol)) | 1271 | if (!err) { |
1272 | goto again; | 1272 | if (!xfrm_pol_hold_rcu(pol)) |
1273 | else if (err == -ESRCH) | 1273 | goto again; |
1274 | } else if (err == -ESRCH) { | ||
1274 | pol = NULL; | 1275 | pol = NULL; |
1275 | else | 1276 | } else { |
1276 | pol = ERR_PTR(err); | 1277 | pol = ERR_PTR(err); |
1278 | } | ||
1277 | } else | 1279 | } else |
1278 | pol = NULL; | 1280 | pol = NULL; |
1279 | } | 1281 | } |