IB/mlx5: Reset access mask when looping inside page fault handler
authorMoni Shoua <monis@mellanox.com>
Mon, 2 Sep 2019 14:16:07 +0000 (10:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Sep 2019 06:22:10 +0000 (08:22 +0200)
commitfeced628c0684b0cfd8f5c42bd82f05651b31303
tree77731c469c08e5b0a264a12db934824dc9e333c0
parent37222eaf7eb7f4f88ac70a36df492c94da517886
IB/mlx5: Reset access mask when looping inside page fault handler

[ Upstream commit 1abe186ed8a6593069bc122da55fc684383fdc1c ]

If page-fault handler spans multiple MRs then the access mask needs to
be reset before each MR handling or otherwise write access will be
granted to mapped pages instead of read-only.

Cc: <stable@vger.kernel.org> # 3.19
Fixes: 7bdf65d411c1 ("IB/mlx5: Handle page faults")
Reported-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx5/odp.c