mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
RDMA/mlx5: Call dev_put() after the blocking notifier
Move dev_put() call to occur directly after the blocking
notifier, instead of within the event handler.
Fixes: 8d159eb211
("RDMA/mlx5: Use IB set_netdev and get_netdev functions")
Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Link: https://patch.msgid.link/342ff94b3dcbb07da1c7dab862a73933d604b717.1730381292.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
eb3d354efb
commit
6d9c7b2729
@ -3242,7 +3242,6 @@ static int lag_event(struct notifier_block *nb, unsigned long event, void *data)
|
||||
}
|
||||
err = ib_device_set_netdev(&dev->ib_dev, ndev,
|
||||
portnum + 1);
|
||||
dev_put(ndev);
|
||||
if (err)
|
||||
return err;
|
||||
/* Rescan gids after new netdev assignment */
|
||||
|
@ -516,6 +516,7 @@ void mlx5_modify_lag(struct mlx5_lag *ldev,
|
||||
blocking_notifier_call_chain(&dev0->priv.lag_nh,
|
||||
MLX5_DRIVER_EVENT_ACTIVE_BACKUP_LAG_CHANGE_LOWERSTATE,
|
||||
ndev);
|
||||
dev_put(ndev);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user