diff options
author | Aharon Landau <aharonl@nvidia.com> | 2021-10-28 08:55:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-18 21:16:58 +0300 |
commit | 1c6eefe997adab514917b788ab446e02175dfbe0 (patch) | |
tree | 60954b4976148a4ea2a388b763a1af0033a9bd79 /security | |
parent | 3f49a9d356bdb741fbabf4ac0f6a341e0bdc3fd7 (diff) | |
download | linux-1c6eefe997adab514917b788ab446e02175dfbe0.tar.xz |
RDMA/core: Require the driver to set the IOVA correctly during rereg_mr
[ Upstream commit f1a090f09f42be5a5542009f0be310fdb3e768fc ]
If the driver returns a new MR during rereg it has to fill it with the
IOVA from the proper source. If IB_MR_REREG_TRANS is set then the IOVA is
cmd.hca_va, otherwise the IOVA comes from the old MR. mlx5 for example has
two calls inside rereg_mr:
return create_real_mr(new_pd, umem, mr->ibmr.iova,
new_access_flags);
and
return create_real_mr(new_pd, new_umem, iova, new_access_flags);
Unconditionally overwriting the iova in the newly allocated MR will
corrupt the iova if the first path is used.
Remove the redundant initializations from ib_uverbs_rereg_mr().
Fixes: 6e0954b11c05 ("RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr")
Link: https://lore.kernel.org/r/4b0a31bbc372842613286a10d7a8cbb0ee6069c7.1635400472.git.leonro@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions