Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit edd79cf0 authored by Xin Long's avatar Xin Long Committed by Greg Kroah-Hartman
Browse files

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: 6ed69184 ("xfrm: Reset secpath in xfrm failure")
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cd7031ef
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -63,11 +63,9 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head,
		sp->olen++;
		sp->olen++;


		xo = xfrm_offload(skb);
		xo = xfrm_offload(skb);
		if (!xo) {
		if (!xo)
			xfrm_state_put(x);
			goto out_reset;
			goto out_reset;
	}
	}
	}


	xo->flags |= XFRM_GRO;
	xo->flags |= XFRM_GRO;


+1 −3
Original line number Original line Diff line number Diff line
@@ -85,11 +85,9 @@ static struct sk_buff *esp6_gro_receive(struct list_head *head,
		sp->olen++;
		sp->olen++;


		xo = xfrm_offload(skb);
		xo = xfrm_offload(skb);
		if (!xo) {
		if (!xo)
			xfrm_state_put(x);
			goto out_reset;
			goto out_reset;
	}
	}
	}


	xo->flags |= XFRM_GRO;
	xo->flags |= XFRM_GRO;