diff options
author | Saeed Mahameed <saeedm@nvidia.com> | 2021-02-25 11:20:00 -0800 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-05-18 23:01:38 -0700 |
commit | 77ecd10d0a8aaa6e4871d8c63626e4c9fc5e47db (patch) | |
tree | 60426546b4d9b07f859b17048364af68ad884edc /drivers/iommu/virtio-iommu.c | |
parent | eb96cc15926f4ddde3a28c42feeffdf002451c24 (diff) |
net/mlx5e: reset XPS on error flow if netdev isn't registered yet
mlx5e_attach_netdev can be called prior to registering the netdevice:
Example stack:
ipoib_new_child_link ->
ipoib_intf_init->
rdma_init_netdev->
mlx5_rdma_setup_rn->
mlx5e_attach_netdev->
mlx5e_num_channels_changed ->
mlx5e_set_default_xps_cpumasks ->
netif_set_xps_queue ->
__netif_set_xps_queue -> kmalloc
If any later stage fails at any point after mlx5e_num_channels_changed()
returns, XPS allocated maps will never be freed as they
are only freed during netdev unregistration, which will never happen for
yet to be registered netdevs.
Fixes: 3909a12e7913 ("net/mlx5e: Fix configuration of XPS cpumasks and netdev queues in corner cases")
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Diffstat (limited to 'drivers/iommu/virtio-iommu.c')
0 files changed, 0 insertions, 0 deletions