linux/drivers/scsi/libfc
Hannes Reinecke baa6719f90 libfc: Update rport reference counting
Originally libfc would just be initializing the refcount to '1', and
using the disc_mutex to synchronize if and when the final put should be
happening.  This has a race condition as the mutex might be delayed,
causing other threads to access an invalid structure.  This patch
updates the rport reference counting to increase the reference every
time 'rport_lookup' is called, and decreases the reference
correspondingly.  This removes the need to hold 'disc_mutex' when
removing the structure, and avoids the above race condition.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Acked-by: Vasu Dev <vasu.dev@intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-07-12 23:16:31 -04:00
..
fc_disc.c libfc, fcoe, bnx2fc: Split fc_disc_init into fc_disc_{init, config} 2013-03-25 16:03:03 -07:00
fc_elsct.c [SCSI] libfc: Make the libfc Common Transport(CT) code generic 2012-02-19 08:08:58 -06:00
fc_exch.c libfc: Fix fc_exch_recv_req() error path 2015-08-12 11:23:30 -07:00
fc_fcp.c SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
fc_frame.c [SCSI] libfc, fcoe, bnx2fc: cleanup fcoe_dev_stats 2012-07-20 08:31:47 +01:00
fc_libfc.c libfc: Replace rcu_assign_pointer() with RCU_INIT_POINTER() 2014-09-30 09:28:36 +02:00
fc_libfc.h libfc, libfcoe, fcoe: Convert debug_logging macros to pr_info 2012-12-14 10:38:55 -08:00
fc_lport.c libfc: Update rport reference counting 2016-07-12 23:16:31 -04:00
fc_npiv.c libfc: Use the correct function name in kernel-doc comment. 2015-11-09 17:15:52 -08:00
fc_rport.c libfc: Update rport reference counting 2016-07-12 23:16:31 -04:00
Makefile [SCSI] libfc: add some generic NPIV support routines to libfc 2009-12-04 12:00:56 -06:00