RDMA/mlx5: Use rdma_user_map_io for mapping BAR pages
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 16 Apr 2019 11:07:26 +0000 (14:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 May 2019 08:02:45 +0000 (10:02 +0200)
commit52c44c4e81b31974284fde64deb02c4e1a2bd66c
tree3337126c045ffee269b128176540024408305fa6
parent92d6731e6a6f28a0b3e59cc034e448b4280bbc23
RDMA/mlx5: Use rdma_user_map_io for mapping BAR pages

commit d5e560d3f72382ac4e3bfe4e0f0420e6a220b039 upstream.

Since mlx5 supports device disassociate it must use this API for all
BAR page mmaps, otherwise the pages can remain mapped after the device
is unplugged causing a system crash.

Cc: stable@vger.kernel.org
Fixes: 5f9794dc94f5 ("RDMA/ucontext: Add a core API for mmaping driver IO memory")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/main.c