diff options
author | Paolo Abeni <pabeni@redhat.com> | 2024-11-19 13:27:50 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-11-19 13:56:02 +0100 |
commit | dd7207838d38780b51e4690ee508ab2d5057e099 (patch) | |
tree | afcf5e28f88a62efe57bcdff46419084b808839c /net/xdp | |
parent | 96ed62ea02984f14b6d4f2e4aed327d803875b7a (diff) | |
parent | 66418447d27b7f4c027587582a133dd0bc0a663b (diff) | |
download | linux-stable-dd7207838d38780b51e4690ee508ab2d5057e099.tar.gz linux-stable-dd7207838d38780b51e4690ee508ab2d5057e099.tar.bz2 linux-stable-dd7207838d38780b51e4690ee508ab2d5057e099.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Merge in late fixes to prepare for the 6.13 net-next PR.
Conflicts:
include/linux/phy.h
41ffcd95015f net: phy: fix phylib's dual eee_enabled
721aa69e708b net: phy: convert eee_broken_modes to a linkmode bitmap
https://lore.kernel.org/all/20241118135512.1039208b@canb.auug.org.au/
drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c
2160428bcb20 net: txgbe: fix null pointer to pcs
2160428bcb20 net: txgbe: remove GPIO interrupt controller
Adjacent commits:
include/linux/phy.h
41ffcd95015f net: phy: fix phylib's dual eee_enabled
516a5f11eb97 net: phy: respect cached advertising when re-enabling EEE
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/xdp')
-rw-r--r-- | net/xdp/xsk.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 7d7e37f53708..3fa70286c846 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -675,6 +675,8 @@ static struct sk_buff *xsk_build_skb(struct xdp_sock *xs, len = desc->len; if (!skb) { + first_frag = true; + hr = max(NET_SKB_PAD, L1_CACHE_ALIGN(dev->needed_headroom)); tr = dev->needed_tailroom; skb = sock_alloc_send_skb(&xs->sk, hr + len + tr, 1, &err); @@ -685,12 +687,8 @@ static struct sk_buff *xsk_build_skb(struct xdp_sock *xs, skb_put(skb, len); err = skb_store_bits(skb, 0, buffer, len); - if (unlikely(err)) { - kfree_skb(skb); + if (unlikely(err)) goto free_err; - } - - first_frag = true; } else { int nr_frags = skb_shinfo(skb)->nr_frags; struct page *page; @@ -758,6 +756,9 @@ static struct sk_buff *xsk_build_skb(struct xdp_sock *xs, return skb; free_err: + if (first_frag && skb) + kfree_skb(skb); + if (err == -EOVERFLOW) { /* Drop the packet */ xsk_set_destructor_arg(xs->skb); |