linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] Fix SDMA/TID caching code
@ 2016-07-28 19:21 ira.weiny-ral2JQCrhuEAvxtiuMwx3w
       [not found] ` <1469733687-31738-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: ira.weiny-ral2JQCrhuEAvxtiuMwx3w @ 2016-07-28 19:21 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ira Weiny

From: Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

This series fixes a number of bugs found while debugging the use of the
mm_struct "current->mm".  When PSM jobs were stopped unexpectedly (for example
control-c) it was possible for the wrong mm struct to be used in
mmu_notifier_unregister.  This was causing memory corruption.  In addition, a
number of might sleep conditions were found when mmap_sem needed to be taken
while a spinlock was held.

The following are stand alone fixes which can probably be reordered if
necessary:

	IB/hfi1: Prevent null pointer dereference
	IB/hfi1: Use the same capability state for all shared contexts
	IB/hfi1: Validate SDMA user request index
	IB/hfi1: Validate SDMA user iovector count
	IB/hfi1: Release node on insert failure
	IB/hfi1: Fix error condition that needs to clean up
	IB/hfi1: Fix user SDMA racy user request claim

The use of mm and locking issues are fixed with the following commits (they
depend on the previous commits and must be ordered among themselves):

	IB/hfi1: Make use of mm consistent
	IB/hfi1: Make the cache handler own its rb tree root
	IB/hfi1: Fix TID caching actions
	IB/hfi1: Add evict operation to the mmu rb handler
	IB/hfi1: Use evict mmu rb operation
	IB/hfi1: Consistently call ops->remove outside spinlock
	IB/hfi1: Remove unneeded mm argument in remove function
	IB/hfi1: Fix memory leak during unexpected shutdown
	IB/hfi1: Add cache evict LRU list

Special thanks to Jim Foraker <foraker1-i2BcT+NCU+M@public.gmane.org> for suggestions on how to fix
the main issues.

This series requires the clean up patch series sent previously.

Dean Luick (13):
  IB/hfi1: Use the same capability state for all shared contexts
  IB/hfi1: Validate SDMA user request index
  IB/hfi1: Validate SDMA user iovector count
  IB/hfi1: Release node on insert failure
  IB/hfi1: Fix error condition that needs to clean up
  IB/hfi1: Fix user SDMA racy user request claim
  IB/hfi1: Make the cache handler own its rb tree root
  IB/hfi1: Fix TID caching actions
  IB/hfi1: Add evict operation to the mmu rb handler
  IB/hfi1: Use evict mmu rb operation
  IB/hfi1: Consistently call ops->remove outside spinlock
  IB/hfi1: Remove unneeded mm argument in remove function
  IB/hfi1: Add cache evict LRU list

Ira Weiny (3):
  IB/hfi1: Prevent null pointer dereference
  IB/hfi1: Make use of mm consistent
  IB/hfi1: Fix memory leak during unexpected shutdown

 drivers/infiniband/hw/hfi1/chip.c         |   8 --
 drivers/infiniband/hw/hfi1/chip.h         |   2 -
 drivers/infiniband/hw/hfi1/file_ops.c     |  31 ++--
 drivers/infiniband/hw/hfi1/hfi.h          |  13 +-
 drivers/infiniband/hw/hfi1/mmu_rb.c       | 214 ++++++++++++++++++---------
 drivers/infiniband/hw/hfi1/mmu_rb.h       |  32 +++--
 drivers/infiniband/hw/hfi1/user_exp_rcv.c | 115 ++++++++-------
 drivers/infiniband/hw/hfi1/user_pages.c   |  19 +--
 drivers/infiniband/hw/hfi1/user_sdma.c    | 230 +++++++++++++++---------------
 drivers/infiniband/hw/hfi1/user_sdma.h    |   8 +-
 10 files changed, 386 insertions(+), 286 deletions(-)

-- 
1.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-08-03  3:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-28 19:21 [PATCH 00/16] Fix SDMA/TID caching code ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <1469733687-31738-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-28 19:21   ` [PATCH 01/16] IB/hfi1: Prevent null pointer dereference ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 02/16] IB/hfi1: Use the same capability state for all shared contexts ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 03/16] IB/hfi1: Validate SDMA user request index ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 04/16] IB/hfi1: Validate SDMA user iovector count ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 05/16] IB/hfi1: Release node on insert failure ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 06/16] IB/hfi1: Fix error condition that needs to clean up ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 07/16] IB/hfi1: Fix user SDMA racy user request claim ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 08/16] IB/hfi1: Make use of mm consistent ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 09/16] IB/hfi1: Make the cache handler own its rb tree root ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 10/16] IB/hfi1: Fix TID caching actions ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 11/16] IB/hfi1: Add evict operation to the mmu rb handler ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 12/16] IB/hfi1: Use evict mmu rb operation ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 13/16] IB/hfi1: Consistently call ops->remove outside spinlock ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 14/16] IB/hfi1: Remove unneeded mm argument in remove function ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 15/16] IB/hfi1: Fix memory leak during unexpected shutdown ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-07-28 19:21   ` [PATCH 16/16] IB/hfi1: Add cache evict LRU list ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2016-08-03  3:04   ` [PATCH 00/16] Fix SDMA/TID caching code Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).