Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec
Steffen Klassert says: ==================== pull request (net): ipsec 2019-11-13 1) Fix a page memleak on xfrm state destroy. 2) Fix a refcount imbalance if a xfrm_state gets invaild during async resumption. From Xiaodong Xu. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
c3afb7eab0
|
@ -480,6 +480,9 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
|
|||
else
|
||||
XFRM_INC_STATS(net,
|
||||
LINUX_MIB_XFRMINSTATEINVALID);
|
||||
|
||||
if (encap_type == -1)
|
||||
dev_put(skb->dev);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
|
|
@ -495,6 +495,8 @@ static void ___xfrm_state_destroy(struct xfrm_state *x)
|
|||
x->type->destructor(x);
|
||||
xfrm_put_type(x->type);
|
||||
}
|
||||
if (x->xfrag.page)
|
||||
put_page(x->xfrag.page);
|
||||
xfrm_dev_state_free(x);
|
||||
security_xfrm_state_free(x);
|
||||
xfrm_state_free(x);
|
||||
|
|
Loading…
Reference in New Issue