diff options
author | Shay Drory <shayd@nvidia.com> | 2023-02-06 12:52:02 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-05-23 08:38:06 +0300 |
commit | 8c253dfc89efde6b5faddf9e7400e5d17884e042 (patch) | |
tree | 91e2a4e11051914cc44c1a841ec3dd7b6cebc5e8 /mm/mlock.c | |
parent | dfa1e46d6093831b9d49f0f350227a1d13644a2f (diff) | |
download | linux-8c253dfc89efde6b5faddf9e7400e5d17884e042.tar.xz |
net/mlx5: E-switch, Devcom, sync devcom events and devcom comp register
devcom events are sent to all registered component. Following the
cited patch, it is possible for two components, e.g.: two eswitches,
to send devcom events, while both components are registered. This
means eswitch layer will do double un/pairing, which is double
allocation and free of resources, even though only one un/pairing is
needed. flow example:
cpu0 cpu1
---- ----
mlx5_devlink_eswitch_mode_set(dev0)
esw_offloads_devcom_init()
mlx5_devcom_register_component(esw0)
mlx5_devlink_eswitch_mode_set(dev1)
esw_offloads_devcom_init()
mlx5_devcom_register_component(esw1)
mlx5_devcom_send_event()
mlx5_devcom_send_event()
Hence, check whether the eswitches are already un/paired before
free/allocation of resources.
Fixes: 09b278462f16 ("net: devlink: enable parallel ops on netlink interface")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'mm/mlock.c')
0 files changed, 0 insertions, 0 deletions