mirror_ubuntu-kernels/drivers/infiniband/hw
Jason Gunthorpe a639e66703 RDMA/mlx5: Zero out ODP related items in the mlx5_ib_mr
All of the ODP code assumes when it calls mlx5_mr_cache_alloc() the ODP
related fields are zero'd. This is true if the MR was just allocated, but
if the MR is recycled through the cache then the values are never zero'd.

This causes a bug in the odp_stats, they don't reset when the MR is
reallocated, also is_odp_implicit is never 0'd.

So we can use memset on a block of the mlx5_ib_mr reorganize the structure
to put all the data that can be zero'd by the cache at the end.

It is organized as an anonymous struct because the next patch will make
this a union.

Delete the unused smr_info. Don't set the kernel only desc_size on the
user path. No longer any need to zero mr->parent before freeing it, the
memset() will get it now.

Fixes: a3de94e3d6 ("IB/mlx5: Introduce ODP diagnostic counters")
Link: https://lore.kernel.org/r/20210304120745.1090751-2-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2021-03-11 20:03:25 -04:00
..
bnxt_re RDMA/bnxt_re: Allow bigger MR creation 2021-01-18 16:56:09 -04:00
cxgb4 Linux 5.11 2021-02-18 11:19:29 -04:00
efa RDMA/efa: Remove unused syndrome enum values 2021-01-28 15:56:13 -04:00
hfi1 RDMA/hw/hfi1/rc: Demote incorrectly populated kernel-doc header 2021-01-28 15:42:30 -04:00
hns RDMA/hns: Add support for XRC on HIP09 2021-03-11 19:51:27 -04:00
i40iw RDMA/hw/i40iw/i40iw_verbs: Fix worthy function headers and demote some others 2021-01-19 20:33:43 -04:00
mlx4 IB/mlx4: Use port iterator and validation APIs 2021-02-02 19:25:40 -04:00
mlx5 RDMA/mlx5: Zero out ODP related items in the mlx5_ib_mr 2021-03-11 20:03:25 -04:00
mthca Linux 5.10-rc6 2020-12-01 20:40:50 -04:00
ocrdma RDMA/ocrdma: Fix use after free in ocrdma_dealloc_ucontext_pd() 2021-01-07 16:37:11 -04:00
qedr RDMA/qedr: Use true and false for bool variable 2021-02-16 14:42:58 -04:00
qib RDMA/hw/qib/qib_iba6120: Fix some repeated (copy/paste) kernel-doc issues 2021-01-22 14:37:35 -04:00
usnic RDMA/usnic: Fix misuse of sysfs_emit_at 2021-01-19 20:27:29 -04:00
vmw_pvrdma Linux 5.11 2021-02-18 11:19:29 -04:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00