Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] net/mlx5e: fix NULL derefs when RX queue mapping outlives channel reconfig
@ 2026-07-14 22:29 Rishikesh Jethwani
  2026-07-14 22:29 ` [PATCH 1/2] net/mlx5e: kTLS: reject stale RX queue mapping on RX offload setup Rishikesh Jethwani
  2026-07-14 22:29 ` [PATCH 2/2] net/mlx5e: kTLS: guard RX resync against stale channel index Rishikesh Jethwani
  0 siblings, 2 replies; 5+ messages in thread
From: Rishikesh Jethwani @ 2026-07-14 22:29 UTC (permalink / raw)
  To: netdev
  Cc: john.fastabend, kuba, sd, davem, pabeni, edumazet, leon,
	nils.juenemann, Rishikesh Jethwani

Hi all,

This series fixes two related NULL derefs in mlx5e's kTLS RX offload that
surface when a channel-count reduction (e.g. ethtool -L combined N) leaves
sockets carrying a queue index that is no longer valid

Patch 1: reject stale RX queue mapping on RX offload setup
Patch 2: guard RX resync against stale channel index

Not addressed in this series:

- Torn reads of `priv->channels` during the struct-copy publish in
  `mlx5e_switch_priv_channels()`. A reader on another CPU can still
  briefly observe `{new c, old num}`, so bounds-checking against a
  stale `num` can pass while dereferencing the new smaller array.
  Closing that window likely needs proper synchronization,
  such as RCU pointer, which is a larger change and better handled
  in a separate series.
    
- Re-homing existing offloaded sockets across a channel shrink so
  `priv_rx->rxq` remains valid. Patch 2 makes this failure mode graceful
  by preventing the dereference, but the offload remains functionally
  broken until the socket is torn down and re-added. That looks like a
  broader design question for the mlx5 maintainers.

Rishikesh Jethwani (2):
  net/mlx5e: kTLS: reject stale RX queue mapping on RX offload setup
  net/mlx5e: kTLS: guard RX resync against stale channel index

 .../mellanox/mlx5/core/en_accel/ktls_rx.c     | 24 ++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-16  9:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 22:29 [PATCH net 0/2] net/mlx5e: fix NULL derefs when RX queue mapping outlives channel reconfig Rishikesh Jethwani
2026-07-14 22:29 ` [PATCH 1/2] net/mlx5e: kTLS: reject stale RX queue mapping on RX offload setup Rishikesh Jethwani
2026-07-16  8:35   ` Tariq Toukan
2026-07-16  9:02     ` Tariq Toukan
2026-07-14 22:29 ` [PATCH 2/2] net/mlx5e: kTLS: guard RX resync against stale channel index Rishikesh Jethwani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox