1
0
Fork 0

xfrm: remove the xfrm_state_put call becofe going to out_reset

commit db87668ad1 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: 6ed69184ed ("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>
5.4-rM2-2.2.x-imx-squashed
Xin Long 2020-04-10 17:08:24 +08:00 committed by Greg Kroah-Hartman
parent cd7031ef96
commit edd79cf0cf
2 changed files with 2 additions and 6 deletions

View File

@ -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;

View File

@ -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;