]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx5: Use different doorbell memory for different processes
authorMark Zhang <markzhang@nvidia.com>
Thu, 3 Jun 2021 13:18:03 +0000 (16:18 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 3 Jun 2021 17:19:53 +0000 (14:19 -0300)
commitb669775854aca7d16fc400687b6997fc78fc602c
tree6b491664cf556a62801f3d0f18a3cae8e6fc27d2
parent2a84fd9a4af3ac1449a758890bed076ab1ea26f9
RDMA/mlx5: Use different doorbell memory for different processes

In a fork scenario, the parent and child can have same virtual address and
also share the uverbs fd.  That causes to the list_for_each_entry search
return same doorbell physical page for all processes, even though that
page has been COW' or copied.

This patch takes the mm_struct into consideration during search, to make
sure that VA's belonging to different processes are not intermixed.

Resolves the malfunction of uverbs after fork in some specific cases.

Fixes: ffaf2c1a3989 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Link: https://lore.kernel.org/r/feacc23fe0bc6e1088c6824d5583798745e72405.1622726212.git.leonro@nvidia.com
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/doorbell.c