]> git.baikalelectronics.ru Git - kernel.git/commit
veth: use skb_orphan_partial instead of skb_orphan
authorPaolo Abeni <pabeni@redhat.com>
Fri, 9 Apr 2021 11:04:37 +0000 (13:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Apr 2021 23:39:28 +0000 (16:39 -0700)
commiteac70becd67316a510e591b5db3260fe1289b066
tree72238a58f381c016d1f32b1fe01bd833a6ae47e5
parent0699eb9b050a39af0acb318ba12f4ba37a0636bc
veth: use skb_orphan_partial instead of skb_orphan

As described by commit 7db3198e75cc ("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 eb2d0e377133 ("veth:
Orphan skb before GRO")

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/veth.c