From: Paolo Abeni Date: Fri, 9 Apr 2021 11:04:37 +0000 (+0200) Subject: veth: use skb_orphan_partial instead of skb_orphan X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c75fb320d482a5ce6e522378d137fd2c3bf79225;p=linux.git veth: use skb_orphan_partial instead of skb_orphan As described by commit 9c4c325252c5 ("skbuff: preserve sock reference when scrubbing the skb."), orphaning a skb in the TX path will cause OoO. Let's use skb_orphan_partial() instead of skb_orphan(), so that we keep the sk around for queue's selection sake and we still avoid the problem fixed with commit 4bf9ffa0fb57 ("veth: Orphan skb before GRO") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller --- diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 9e525646df1d9..ce085659d55fd 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -686,7 +686,7 @@ static struct sk_buff *veth_xdp_rcv_skb(struct veth_rq *rq, int mac_len, delta, off; struct xdp_buff xdp; - skb_orphan(skb); + skb_orphan_partial(skb); rcu_read_lock(); xdp_prog = rcu_dereference(rq->xdp_prog);