Skip to content

Commit 6d9c7b2

Browse files
chiarameiohasrleon
authored andcommitted
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: 8d159eb ("RDMA/mlx5: Use IB set_netdev and get_netdev functions") Signed-off-by: Chiara Meiohas <[email protected]> Link: https://patch.msgid.link/342ff94b3dcbb07da1c7dab862a73933d604b717.1730381292.git.leon@kernel.org Signed-off-by: Leon Romanovsky <[email protected]>
1 parent eb3d354 commit 6d9c7b2

File tree

2 files changed

+1
-1
lines changed
  • drivers
    • infiniband/hw/mlx5
    • net/ethernet/mellanox/mlx5/core/lag

2 files changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3242,7 +3242,6 @@ static int lag_event(struct notifier_block *nb, unsigned long event, void *data)
32423242
}
32433243
err = ib_device_set_netdev(&dev->ib_dev, ndev,
32443244
portnum + 1);
3245-
dev_put(ndev);
32463245
if (err)
32473246
return err;
32483247
/* Rescan gids after new netdev assignment */

drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ void mlx5_modify_lag(struct mlx5_lag *ldev,
516516
blocking_notifier_call_chain(&dev0->priv.lag_nh,
517517
MLX5_DRIVER_EVENT_ACTIVE_BACKUP_LAG_CHANGE_LOWERSTATE,
518518
ndev);
519+
dev_put(ndev);
519520
}
520521
}
521522

0 commit comments

Comments
 (0)