diff options
author | Ariel Levkovich <lariel@mellanox.com> | 2019-05-05 17:07:12 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-05-06 18:51:51 +0300 |
commit | 4056b12efd43248d8331b6ed93df5ea5250106a9 (patch) | |
tree | 42b37126b4db12855dd55cb6071d6e1915c524d7 /drivers | |
parent | 3b113a1ec3d4ac7e1e621b77650ac05491f5924a (diff) | |
download | linux-4056b12efd43248d8331b6ed93df5ea5250106a9.tar.xz |
IB/mlx5: Warn on allocated MEMIC buffers during cleanup
Adding a warning on allocated MEMIC buffers that weren't freed prior to
driver tear down.
Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Reviewed-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 97f32a03e456..803aea335953 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -5907,6 +5907,8 @@ static void mlx5_ib_stage_init_cleanup(struct mlx5_ib_dev *dev) srcu_barrier(&dev->mr_srcu); cleanup_srcu_struct(&dev->mr_srcu); } + + WARN_ON(!bitmap_empty(dev->dm.memic_alloc_pages, MLX5_MAX_MEMIC_PAGES)); } static int mlx5_ib_stage_init_init(struct mlx5_ib_dev *dev) |