From: Li RongQing Date: Mon, 17 Sep 2012 22:40:10 +0000 (+0000) Subject: xfrm: fix a read lock imbalance in make_blackhole X-Git-Tag: v3.0.46~72 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=72ab84bd1945bb593047564680ea919b8e13beeb;p=karo-tx-linux.git 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 0c0e40e9cfc1..7c8e0cb1e153 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -1759,7 +1759,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); }