]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libfc: Add WARN_ON() when deleting rports
authorHannes Reinecke <hare@suse.de>
Wed, 11 Jul 2018 08:09:29 +0000 (10:09 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 13 Jul 2018 03:01:16 +0000 (23:01 -0400)
commitc413619c95c387e64c406dbc2fd9bdfe6a2e6b7f
treece26338dc33a28ac9cfe4d99a386254adce4ff19
parent117bb8fc378bee25234e17aaa007e74d12bd56c9
scsi: libfc: Add WARN_ON() when deleting rports

The discovery rport list handling is quite odd; the list traversal is
independent from the lifetime of the rport itself. This makes auditing
quite tricky, and the chance remains that we've missed something.  So this
patch adds a WARN_ON() statement when freeing an rport which is still part
of a list.

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_rport.c