mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
xfrm: fix a read lock imbalance in make_blackhole
[ Upstream commit 433a195480 ]
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
182d22d51b
commit
72ab84bd19
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user