From b9f85b1d32cc55b20984149eacb2e6f4c3aedca3 Mon Sep 17 00:00:00 2001 From: Laurence Oberman Date: Tue, 25 Nov 2014 09:16:42 -0500 Subject: [PATCH] qla2xxx: fix race in handling rport deletion during recovery causes panic When we have an rport disconnect we race during rport deletion and re-connection resulting in a panic. When we do this, we call fc_remote_port_del() just before we do the calls to re-establish the session with the FC transport with fc_remote_port_add() and then fc_remote_port_rolechg(). If we remove the call to fc_remote_port_del() before re-establishing the connection this prevents the race. This patch has resolved this for multiple customers via test kernels. Suggested by Chad Dupuis, implemented and tested by Laurence Oberman. Signed-off-by: Laurence Oberman Acked-by: Chad Dupuis Signed-off-by: Christoph Hellwig --- drivers/scsi/qla2xxx/qla_init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index a4dde7e80dbd..e59f25bff7ab 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3237,8 +3237,6 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport) struct fc_rport *rport; unsigned long flags; - qla2x00_rport_del(fcport); - rport_ids.node_name = wwn_to_u64(fcport->node_name); rport_ids.port_name = wwn_to_u64(fcport->port_name); rport_ids.port_id = fcport->d_id.b.domain << 16 |