Skip to content

Commit

Permalink
xfrm: fix a read lock imbalance in make_blackhole
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Li RongQing authored and David S. Miller committed Sep 18, 2012
1 parent 1d57f19 commit 433a195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1764,7 +1764,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);
}
Expand Down

0 comments on commit 433a195

Please sign in to comment.