summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-05-24 08:11:58 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2016-07-12 23:16:31 -0400
commitbaa6719f902af9c03e528b08dfb847de295b5137 (patch)
tree8ac928054932e15da8feaa5a60b7385ab0787958 /drivers/scsi/scsi_debug.c
parent7e1ee4412ca35b17e21159d85224e37e8f259311 (diff)
downloadlinux-baa6719f902af9c03e528b08dfb847de295b5137.tar.bz2
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>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
0 files changed, 0 insertions, 0 deletions