Skip to content

Commit 433a195

Browse files
Li RongQingdavem330
authored andcommitted
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>
1 parent 1d57f19 commit 433a195

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/xfrm/xfrm_policy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,7 @@ static struct dst_entry *make_blackhole(struct net *net, u16 family,
17641764

17651765
if (!afinfo) {
17661766
dst_release(dst_orig);
1767-
ret = ERR_PTR(-EINVAL);
1767+
return ERR_PTR(-EINVAL);
17681768
} else {
17691769
ret = afinfo->blackhole_route(net, dst_orig);
17701770
}

0 commit comments

Comments
 (0)