]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libfc: hold disc_mutex in fc_disc_stop_rports()
authorHannes Reinecke <hare@suse.de>
Wed, 11 Jul 2018 08:09:28 +0000 (10:09 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 13 Jul 2018 03:01:16 +0000 (23:01 -0400)
commit5c7f1069189a826b8aa569e9c74ab9f13a7ecaea
treef9c4a04f23c7f53692304362cb56aa38dc275785
parentdfd89e7b24cb551d842d6bedfea9e228d0e07348
scsi: libfc: hold disc_mutex in fc_disc_stop_rports()

fc_disc_stop_rports() is calling fc_rport_logoff(), which in turn is
acquiring the rport mutex. So we cannot use RCU list traversal here, but
rather need to hold the disc mutex to avoid list corruption while
traversing.

Fixes: 66d83c01de73 ("scsi: libfc: Fixup disc_mutex handling")
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_disc.c