Message ID | 20180125192727.dkwuqel3xfut66wj@linux-n805 (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Thu, 2018-01-25 at 11:27 -0800, Davidlohr Bueso wrote: > On Thu, 25 Jan 2018, Jason Gunthorpe wrote: > > > > > > > Since the original post was referred to an ABBA deadlock, wouldn't we > > > have to drop db_tab->mutex, then grab both in the proper order? > > > > I had understood that was only a concern because Davidlohr was having > > trouble proving the callchain didn't include mmap_sem already.. > > > > I can see the call chain all ends on verbs ops, and I know verbs ops > > with ucontext's are never called under mmap_sem by the core code.. > > Right. Ok so this simplifies things and we can just use gup_fast(). > > Thanks, > Davidlohr Thanks, applied.
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c index c6fe89d79248..9a412738d5c3 100644 --- a/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c @@ -472,7 +472,7 @@ int mthca_map_user_db(struct mthca_dev *dev, struct mthca_uar *uar, goto out; } - ret = get_user_pages(uaddr & PAGE_MASK, 1, FOLL_WRITE, pages, NULL); + ret = get_user_pages_fast(uaddr & PAGE_MASK, 1, FOLL_WRITE, pages); if (ret < 0) goto out;