diff options
author | 2020-09-02 11:16:22 +0300 | |
---|---|---|
committer | 2020-09-17 14:04:32 -0300 | |
commit | d18bb3e15201918b8d07e85a6e010ca5ed28dad5 (patch) | |
tree | 7d45bc870c3181f3513c4890ea359324b90a0414 /drivers/infiniband/hw/mlx5/main.c | |
parent | RDMA/cma: Fix use after free race in roce multicast join (diff) | |
download | linux-dev-d18bb3e15201918b8d07e85a6e010ca5ed28dad5.tar.xz linux-dev-d18bb3e15201918b8d07e85a6e010ca5ed28dad5.zip |
RDMA: Clean MW allocation and free flows
Move allocation and destruction of memory windows under ib_core
responsibility and clean drivers to ensure that no updates to MW
ib_core structures are done in driver layer.
Link: https://lore.kernel.org/r/20200902081623.746359-2-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/main.c')
-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 bfa8b6b3c681..8dd2df5a99e9 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -4098,6 +4098,8 @@ static const struct ib_device_ops mlx5_ib_dev_sriov_ops = { static const struct ib_device_ops mlx5_ib_dev_mw_ops = { .alloc_mw = mlx5_ib_alloc_mw, .dealloc_mw = mlx5_ib_dealloc_mw, + + INIT_RDMA_OBJ_SIZE(ib_mw, mlx5_ib_mw, ibmw), }; static const struct ib_device_ops mlx5_ib_dev_xrc_ops = { |