]> 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)
commit117bb8fc378bee25234e17aaa007e74d12bd56c9
treef9c4a04f23c7f53692304362cb56aa38dc275785
parent37a1d9e42f4a6edc91d16ea3fd1478c6fac7b658
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: 500f3c68e93e ("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