summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCosmin Ratiu <cratiu@nvidia.com>2026-05-04 21:10:58 +0300
committerJakub Kicinski <kuba@kernel.org>2026-05-06 05:09:04 +0300
commitae9582cd0b9ccc4a121af300df68fd27f72e9822 (patch)
tree6e16ef323585c1e2ebbc982b288c1a75af3ac872 /scripts
parent0e7c074cfcd9bd93765505f9eb8b42f03ed2a744 (diff)
downloadlinux-ae9582cd0b9ccc4a121af300df68fd27f72e9822.tar.xz
net/mlx5e: psp: Fix invalid access on PSP dev registration fail
priv->psp->psp is initialized with the PSP device as returned by psp_dev_create(). This could also return an error, in which case a future psp_dev_unregister() will result in unpleasantness. Avoid that by using a local variable and only saving the PSP device when registration succeeds. In case psp_dev_create() fails, priv->psp and steering structs are left in place, but they will be inert. The unchecked access of priv->psp in mlx5e_psp_offload_handle_rx_skb() won't happen because without a PSP device, there can be no SAs added and therefore no packets will be successfully decrypted and be handed off to the SW handler. Fixes: 89ee2d92f66c ("net/mlx5e: Support PSP offload functionality") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260504181100.269334-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions