public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 0/5] scsi/bnx2*: Plug hotplug race, correct locking and simplify hotplug code
@ 2017-07-24 10:52 Thomas Gleixner
  2017-07-24 10:52 ` [patch 1/5] scsi/bnx2fc: Plug CPU hotplug race Thomas Gleixner
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Thomas Gleixner @ 2017-07-24 10:52 UTC (permalink / raw)
  To: LKML
  Cc: QLogic-Storage-Upstream, martin.petersen, James Bottomley,
	linux-scsi, Christoph Hellwig, Sebastian Andrzej Siewior

The conversion of the cpu hotplug locking to a percpu rwsem does not longer
allow recursive locking of the hotplug lock.

The BNX2I and BNX2FC drivers install/remove hotplug states with the hotplug
lock held. The install/removal code acquired the hotplug lock as well.

While looking into this, I noticed an interesting hotplug race in the
BNX2FC driver, which could result in dereferencing a NULL pointer or freed
and potentially reused memory.

The following series addresses these problems and as a final step on top it
simplifies the hotplug code in both drivers.

Thanks,

	tglx

----
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c |   68 ++++++++------------------------------
 drivers/scsi/bnx2fc/bnx2fc_hwi.c  |   45 ++++++++++++-------------
 drivers/scsi/bnx2i/bnx2i_init.c   |   64 ++++++++---------------------------
 include/linux/cpuhotplug.h        |    2 -
 4 files changed, 53 insertions(+), 126 deletions(-)

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

end of thread, other threads:[~2017-07-31 22:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-24 10:52 [patch 0/5] scsi/bnx2*: Plug hotplug race, correct locking and simplify hotplug code Thomas Gleixner
2017-07-24 10:52 ` [patch 1/5] scsi/bnx2fc: Plug CPU hotplug race Thomas Gleixner
2017-07-24 10:52 ` [patch 2/5] scsi/bnx2fc: Prevent recursive cpuhotplug locking Thomas Gleixner
2017-07-24 10:52 ` [patch 3/5] scsi/bnx2i: " Thomas Gleixner
2017-07-31 22:09   ` Steven Rostedt
2017-07-24 10:52 ` [patch 4/5] scsi/bnx2fc: Simplify CPU hotplug code Thomas Gleixner
2017-07-24 10:53 ` [patch 5/5] scsi/bnx2i: Simplify cpu " Thomas Gleixner
2017-07-25 13:27 ` [patch 0/5] scsi/bnx2*: Plug hotplug race, correct locking and simplify " Chad Dupuis
2017-07-27  1:58 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox