linux/drivers/infiniband/hw/ipath
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
..
Kconfig
Makefile
ipath_common.h
ipath_cq.c
ipath_debug.h
ipath_diag.c infiniband: add in export.h for files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:35 -04:00
ipath_dma.c
ipath_driver.c IB/ipath: convert to idr_alloc() 2013-02-27 19:10:17 -08:00
ipath_eeprom.c
ipath_file_ops.c aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -07:00
ipath_fs.c fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
ipath_iba6110.c IB/ipath: Replace open-coded ARRAY_SIZE with macro 2012-05-08 11:17:20 -07:00
ipath_init_chip.c IB/ipath: Remove unreachable code 2012-11-22 00:50:51 -08:00
ipath_intr.c IB/ipath: Replace open-coded ARRAY_SIZE with macro 2012-05-08 11:17:20 -07:00
ipath_kernel.h
ipath_keys.c
ipath_mad.c
ipath_mmap.c
ipath_mr.c
ipath_qp.c
ipath_rc.c
ipath_registers.h
ipath_ruc.c
ipath_sdma.c
ipath_srq.c RDMA/core: Add SRQ type field 2011-10-13 09:13:26 -07:00
ipath_stats.c
ipath_sysfs.c infiniband: Fix up users implicitly relying on getting stat.h 2011-10-31 19:31:34 -04:00
ipath_uc.c
ipath_ud.c
ipath_user_pages.c mm: distinguish between mlocked and pinned pages 2011-10-31 17:30:46 -07:00
ipath_user_sdma.c IB/ipath: Convert ipath_user_sdma_pin_pages() to use get_user_pages_fast() 2013-11-08 14:43:11 -08:00
ipath_user_sdma.h
ipath_verbs.c IB/ipath: Correct ipath_verbs_register_sysfs() error handling 2013-04-16 23:04:36 -07:00
ipath_verbs.h
ipath_verbs_mcast.c
ipath_wc_ppc64.c
ipath_wc_x86_64.c