diff options
| author | Prathamesh Deshpande <prathameshdeshpande7@gmail.com> | 2026-04-15 03:49:37 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-20 21:42:30 +0300 |
| commit | d03fc81a57956248383efec99967d0ae627390a8 (patch) | |
| tree | c59b5d9e77afa4930562567a572791bcc4c1d52e /include/linux/errqueue.h | |
| parent | cc1ff87bce1ccd38410ab10960f576dcd17db679 (diff) | |
| download | linux-d03fc81a57956248383efec99967d0ae627390a8.tar.xz | |
net/mlx5: Fix HCA caps leak on notifier init failure
mlx5_mdev_init() allocates HCA caps via mlx5_hca_caps_alloc() before
calling mlx5_notifiers_init(). If notifier initialization fails, the
error path jumps to err_hca_caps and skips mlx5_hca_caps_free(), leaking
allocated caps.
Add a dedicated unwind label for notifier-init failure that frees HCA
caps before continuing the existing cleanup sequence.
Fixes: b6b03097f982 ("net/mlx5: Initialize events outside devlink lock")
Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260415005022.34764-1-prathameshdeshpande7@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions
