summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/umem_odp.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2018-09-03 20:17:31 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-09-06 14:26:51 -0600
commit50704e039ab1d7e6c035d8c27a0b314929bfbe10 (patch)
tree60291667d43f055c39a1b3e69fb7fa3db842f1f8 /drivers/infiniband/core/umem_odp.c
parente1f540c3ed0e9634d0f8c4600f3c85df8aff4ae2 (diff)
RDMA/umem: Restore lockdep check while downgrading lock
Lockdep engine handles correctly downgrade of locks and it simply incorrect to disable lockdep checks prior to calling mmu_notifier. Remove lockdep_off and ensure locks correctness. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/umem_odp.c')
-rw-r--r--drivers/infiniband/core/umem_odp.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c
index 6ec748eccff7..29e34e6a6420 100644
--- a/drivers/infiniband/core/umem_odp.c
+++ b/drivers/infiniband/core/umem_odp.c
@@ -431,13 +431,7 @@ int ib_umem_odp_get(struct ib_ucontext *context, struct ib_umem *umem,
atomic_set(&context->notifier_count, 0);
INIT_HLIST_NODE(&context->mn.hlist);
context->mn.ops = &ib_umem_notifiers;
- /*
- * Lock-dep detects a false positive for mmap_sem vs.
- * umem_rwsem, due to not grasping downgrade_write correctly.
- */
- lockdep_off();
ret_val = mmu_notifier_register(&context->mn, mm);
- lockdep_on();
if (ret_val) {
pr_err("Failed to register mmu_notifier %d\n", ret_val);
ret_val = -EBUSY;