Skip to content

Commit c75fb32

Browse files
Paolo Abenidavem330
authored andcommitted
veth: use skb_orphan_partial instead of skb_orphan
As described by commit 9c4c325 ("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 4bf9ffa ("veth: Orphan skb before GRO") Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7dc85b5 commit c75fb32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/veth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ static struct sk_buff *veth_xdp_rcv_skb(struct veth_rq *rq,
686686
int mac_len, delta, off;
687687
struct xdp_buff xdp;
688688

689-
skb_orphan(skb);
689+
skb_orphan_partial(skb);
690690

691691
rcu_read_lock();
692692
xdp_prog = rcu_dereference(rq->xdp_prog);

0 commit comments

Comments
 (0)