]> Gentwo Git Trees - linux/.git/commit
net/mlx5e: psp, avoid 'accel' NULL pointer dereference
authorCosmin Ratiu <cratiu@nvidia.com>
Wed, 15 Oct 2025 07:05:23 +0000 (10:05 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Oct 2025 22:43:15 +0000 (15:43 -0700)
commit5348d6312446929edabced02bd6438bfe5220e31
tree57ab38149e8555fb80fa651233a37e95487acd7d
parentd0d3e9c2867b32c9c70e39e74b9425871cf0042a
net/mlx5e: psp, avoid 'accel' NULL pointer dereference

The 'accel' parameter of mlx5e_txwqe_build_eseg_csum() and the similar
'state' parameter of mlx5e_accel_tx_ids_len() were NULL when called
from mlx5i_sq_xmit() and were causing kernel panics from that context.

Fix that by passing in a local empty mlx5e_accel_tx_state variable, thus
guaranteeing that 'accel' is never NULL. Also remove an unnecessary
check from mlx5e_tx_wqe_inline_mode().

Fixes: e5a1861a298e ("net/mlx5e: Implement PSP Tx data path")
Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/1760511923-890650-1-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c