Skip to content

Commit db87668

Browse files
lxinklassert
authored andcommitted
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: 6ed6918 ("xfrm: Reset secpath in xfrm failure") Signed-off-by: Xin Long <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent 3c96ec5 commit db87668

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

net/ipv4/esp4_offload.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,8 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head,
6363
sp->olen++;
6464

6565
xo = xfrm_offload(skb);
66-
if (!xo) {
67-
xfrm_state_put(x);
66+
if (!xo)
6867
goto out_reset;
69-
}
7068
}
7169

7270
xo->flags |= XFRM_GRO;

net/ipv6/esp6_offload.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head,
8585
sp->olen++;
8686

8787
xo = xfrm_offload(skb);
88-
if (!xo) {
89-
xfrm_state_put(x);
88+
if (!xo)
9089
goto out_reset;
91-
}
9290
}
9391

9492
xo->flags |= XFRM_GRO;

0 commit comments

Comments
 (0)