diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2012-09-17 18:40:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-18 16:30:15 -0400 |
commit | 433a19548061bb5457b6ab77ed7ea58ca6e43ddb (patch) | |
tree | 97d4a0f66372f2c24b00dcc970f033d6dfd08f6c /net/xfrm/xfrm_policy.c | |
parent | 1d57f19539c074105791da6384a8ad674bba8037 (diff) |
xfrm: fix a read lock imbalance in make_blackhole
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>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index ab2ce7d5152d..387848e90078 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -1764,7 +1764,7 @@ static struct dst_entry *make_blackhole(struct net *net, u16 family, | |||
1764 | 1764 | ||
1765 | if (!afinfo) { | 1765 | if (!afinfo) { |
1766 | dst_release(dst_orig); | 1766 | dst_release(dst_orig); |
1767 | ret = ERR_PTR(-EINVAL); | 1767 | return ERR_PTR(-EINVAL); |
1768 | } else { | 1768 | } else { |
1769 | ret = afinfo->blackhole_route(net, dst_orig); | 1769 | ret = afinfo->blackhole_route(net, dst_orig); |
1770 | } | 1770 | } |