alistair23-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
..
ipath_common.h IB/ipath: Update copyright dates for files changed in 2008 2008-04-16 21:09:32 -07:00
ipath_cq.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ipath_debug.h IB/ipath: Prevent link-recovery code from negating admin disable 2008-04-16 21:09:26 -07:00
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 include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ipath_driver.c IB/ipath: convert to idr_alloc() 2013-02-27 19:10:17 -08:00
ipath_eeprom.c IB: Remove __constant_{endian} uses 2009-01-17 17:11:57 -08:00
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 IB/ipath: Remove support for QLogic PCIe QLE devices 2010-05-23 22:14:25 -07:00
ipath_keys.c IB/ipath: Add locking for interrupt use of ipath_pd contexts vs free 2008-12-05 11:14:38 -08:00
ipath_mad.c IB/pma: Add include file for IBA performance counters definitions 2011-07-18 21:04:35 -07:00
ipath_mmap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ipath_mr.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ipath_qp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ipath_rc.c IB: Remove __constant_{endian} uses 2009-01-17 17:11:57 -08:00
ipath_registers.h IB/ipath: Header file changes to support IBA7220 2008-04-16 21:09:30 -07:00
ipath_ruc.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
ipath_sdma.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ipath_srq.c RDMA/core: Add SRQ type field 2011-10-13 09:13:26 -07:00
ipath_stats.c IB/ipath: Don't count IB symbol and link errors unless link is UP 2008-12-05 11:13:19 -08:00
ipath_sysfs.c infiniband: Fix up users implicitly relying on getting stat.h 2011-10-31 19:31:34 -04:00
ipath_uc.c IB: Remove __constant_{endian} uses 2009-01-17 17:11:57 -08:00
ipath_ud.c Fix common misspellings 2011-03-31 11:26:23 -03:00
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 IB/ipath: Fix many locking issues when switching to error state 2008-05-13 11:41:29 -07:00
ipath_verbs.c IB/ipath: Correct ipath_verbs_register_sysfs() error handling 2013-04-16 23:04:36 -07:00
ipath_verbs.h IB: Remove __constant_{endian} uses 2009-01-17 17:11:57 -08:00
ipath_verbs_mcast.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ipath_wc_ppc64.c IB/ipath: Update copyright dates 2007-07-09 20:12:26 -07:00
ipath_wc_x86_64.c IB/ipath: Update copyright dates 2007-07-09 20:12:26 -07:00
Kconfig IB/ipath: Remove support for QLogic PCIe QLE devices 2010-05-23 22:14:25 -07:00
Makefile IB: Replace EXTRA_CFLAGS with ccflags-y 2010-10-23 13:45:03 -07:00