summaryrefslogtreecommitdiffstats
path: root/net/ipv4/esp4_offload.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2020-04-10 17:08:24 +0800
committerSteffen Klassert <steffen.klassert@secunet.com>2020-04-20 07:17:32 +0200
commitdb87668ad1e4917cfe04e217307ba6ed9390716e (patch)
treea415ef8b374167f84e8f3ec7fd582e7341eacc73 /net/ipv4/esp4_offload.c
parent3c96ec56828922e3fe5477f75eb3fc02f98f98b5 (diff)
downloadlinux-stable-db87668ad1e4917cfe04e217307ba6ed9390716e.tar.gz
linux-stable-db87668ad1e4917cfe04e217307ba6ed9390716e.tar.bz2
linux-stable-db87668ad1e4917cfe04e217307ba6ed9390716e.zip
xfrm: remove the xfrm_state_put call becofe going to out_reset
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>
Diffstat (limited to 'net/ipv4/esp4_offload.c')
-rw-r--r--net/ipv4/esp4_offload.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/esp4_offload.c b/net/ipv4/esp4_offload.c
index 731022cff600..231edcb84c08 100644
--- a/net/ipv4/esp4_offload.c
+++ b/net/ipv4/esp4_offload.c
@@ -63,10 +63,8 @@ static struct sk_buff *esp4_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;