summaryrefslogtreecommitdiff
path: root/fs/devfs/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorShay Drory <shayd@nvidia.com>2026-03-30 22:40:13 +0300
committerJakub Kicinski <kuba@kernel.org>2026-04-01 20:10:40 -0700
commitbf16bca6653679d8a514d6c1c5a2c67065033f14 (patch)
tree3a29a1c18b94bde19bfae5415bb666cf2a031655 /fs/devfs/git@git.tavy.me:linux.git
parentf0f367a4f459cc8118aadc43c6bba53c60d93f8d (diff)
net/mlx5: lag: Check for LAG device before creating debugfs
__mlx5_lag_dev_add_mdev() may return 0 (success) even when an error occurs that is handled gracefully. Consequently, the initialization flow proceeds to call mlx5_ldev_add_debugfs() even when there is no valid LAG context. mlx5_ldev_add_debugfs() blindly created the debugfs directory and attributes. This exposed interfaces (like the members file) that rely on a valid ldev pointer, leading to potential NULL pointer dereferences if accessed when ldev is NULL. Add a check to verify that mlx5_lag_dev(dev) returns a valid pointer before attempting to create the debugfs entries. Fixes: 7f46a0b7327a ("net/mlx5: Lag, add debugfs to query hardware lag state") Signed-off-by: Shay Drory <shayd@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260330194015.53585-2-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/devfs/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions