Skip to content

net: team: fix transmit skb ownership

Weiming Shi lkml netdev stable 2 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesApplied 2/2
  2. v11 patch 2 repliesSuperseded

Changes in v2 from the cover letter

- Use list_first_or_null_rcu() in the queue override helper, as Hangbin suggested, since only one override port can receive the skb.
- Add a separate broadcast-mode fix for the no-port skb leak raised in the AI-generated review forwarded by Jakub.

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: team: stop reusing skb after queue overridedrivers/net/team/team_core.c+8 -80 repliesApplied
2/2net: team: free skb when broadcast has no txable portdrivers/net/team/team_mode_broadcast.c+2 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net v2 0/2] net: team: fix transmit skb ownership

The queue override path can pass an skb to a lower device, see that dev_queue_xmit() returned a drop, and then reuse the consumed skb. Fix the handoff decision separately from the transmit result.

An AI-generated review of v1 forwarded by Jakub identified a separate broadcast-mode leak: bc_transmit() returns without consuming the skb when no port is txable. Fix that in the second patch.

v1: https://lore.kernel.org/r/[email protected]

Changes since v1:
- Use list_first_or_null_rcu() in the queue override helper, as Hangbin suggested, since only one override port can receive the skb.
- Add a separate broadcast-mode fix for the no-port skb leak raised in the AI-generated review forwarded by Jakub.

Weiming Shi (2):
net: team: stop reusing skb after queue override
net: team: free skb when broadcast has no txable port

 drivers/net/team/team_core.c           | 16 ++++++++--------
 drivers/net/team/team_mode_broadcast.c |  2 ++
 2 files changed, 10 insertions(+), 8 deletions(-)
Signature · 1 line
2.55.0