linux_dsm_epyc7002/drivers/infiniband/hw
Jan Kara 4adcf7fb67 IB/ipath: Convert ipath_user_sdma_pin_pages() to use get_user_pages_fast()
ipath_user_sdma_queue_pkts() gets called with mmap_sem held for
writing.  Except for get_user_pages() deep down in
ipath_user_sdma_pin_pages() we don't seem to need mmap_sem at all.

Even more interestingly the function ipath_user_sdma_queue_pkts() (and
also ipath_user_sdma_coalesce() called somewhat later) call
copy_from_user() which can hit a page fault and we deadlock on trying
to get mmap_sem when handling that fault.  So just make
ipath_user_sdma_pin_pages() use get_user_pages_fast() and leave
mmap_sem locking for mm.

This deadlock has actually been observed in the wild when the node
is under memory pressure.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>

[ Merged in fix for call to get_user_pages_fast from Tetsuo Handa
  <penguin-kernel@I-love.SAKURA.ne.jp>.  - Roland ]

Signed-off-by: Roland Dreier <roland@purestorage.com>
2013-11-08 14:43:11 -08:00
..
amso1100 IB: Remove unnecessary semicolons 2013-10-14 10:10:00 -07:00
cxgb3 RDMA/cma: Add IPv6 support for iWARP 2013-08-12 12:32:31 -07:00
cxgb4 RDMA/cxgb4: Issue RI.FINI before closing when entering TERM 2013-08-13 11:55:49 -07:00
ehca treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks 2013-08-20 13:06:40 +02:00
ipath IB/ipath: Convert ipath_user_sdma_pin_pages() to use get_user_pages_fast() 2013-11-08 14:43:11 -08:00
mlx4 IB/core: Temporarily disable create_flow/destroy_flow uverbs 2013-10-21 09:44:17 -07:00
mlx5 IB/mlx5: Ensure proper synchronization accessing memory 2013-10-10 09:24:00 -07:00
mthca IB: Remove unnecessary semicolons 2013-10-14 10:10:00 -07:00
nes RDMA/cma: Add IPv6 support for iWARP 2013-08-12 12:32:31 -07:00
ocrdma IB: Remove unnecessary semicolons 2013-10-14 10:10:00 -07:00
qib Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00