OSDN Git Service

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)
commitbbc0f8bd88abefb0f27998f40a073634a3a2db89
treece26338dc33a28ac9cfe4d99a386254adce4ff19
parentbc3d12b75491c0e844a8a7ce05e84de8f7d94822
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