diff options
author | Xin Long <lucien.xin@gmail.com> | 2020-04-10 12:08:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-03 09:21:32 +0300 |
commit | edd79cf0cfdf0937674f8fcabb97bce64228784b (patch) | |
tree | 9133370a87d59bd33114f275afcb1628f0f0215f /net/ipv6 | |
parent | cd7031ef96833426c9c64dbca0fdbb66dc734d03 (diff) | |
download | linux-edd79cf0cfdf0937674f8fcabb97bce64228784b.tar.xz |
xfrm: remove the xfrm_state_put call becofe going to out_reset
commit db87668ad1e4917cfe04e217307ba6ed9390716e upstream.
This xfrm_state_put call in esp4/6_gro_receive() will cause
double put for state, as in out_reset path secpath_reset()
will put all states set in skb sec_path.
So fix it by simply remove the xfrm_state_put call.
Fixes: 6ed69184ed9c ("xfrm: Reset secpath in xfrm failure")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/esp6_offload.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/esp6_offload.c b/net/ipv6/esp6_offload.c index fd535053245b..428e5e4bf822 100644 --- a/net/ipv6/esp6_offload.c +++ b/net/ipv6/esp6_offload.c @@ -85,10 +85,8 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head, sp->olen++; xo = xfrm_offload(skb); - if (!xo) { - xfrm_state_put(x); + if (!xo) goto out_reset; - } } xo->flags |= XFRM_GRO; |