summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2012-09-17 22:40:10 +0000
committerBen Hutchings <ben@decadent.org.uk>2012-10-10 03:31:22 +0100
commitae0673d65c32a60868f4d7ba342f527c334244a5 (patch)
tree24c37e47c496d7b943b3f9ac5bd21cc6b1550fac /net
parent61819032c7d98c35d2f475032f3c9e30948feaf4 (diff)
xfrm: fix a read lock imbalance in make_blackhole
[ Upstream commit 433a19548061bb5457b6ab77ed7ea58ca6e43ddb ] if xfrm_policy_get_afinfo returns 0, it has already released the read lock, xfrm_policy_put_afinfo should not be called again. Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/xfrm/xfrm_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 01740344c112..113d20ef31a4 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1761,7 +1761,7 @@ static struct dst_entry *make_blackhole(struct net *net, u16 family,
if (!afinfo) {
dst_release(dst_orig);
- ret = ERR_PTR(-EINVAL);
+ return ERR_PTR(-EINVAL);
} else {
ret = afinfo->blackhole_route(net, dst_orig);
}