]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[SCSI] zfcp: No ERP escalation on gpn_ft eval
authorSwen Schillig <swen@vnet.ibm.com>
Wed, 17 Nov 2010 13:23:42 +0000 (14:23 +0100)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 9 Dec 2010 15:41:19 +0000 (09:41 -0600)
If the evaluation of GPN_FT requests wants to remove an invalid port
from the system the zfcp_erp_port_shutdown function is triggered.
Depending on the system status a superior action (e.g. adapter reopen)
is required. This can lead to an invalid mem access of the port struct
which might be freed at the time since the superior action is not
holding a reference of the port which triggered this ERP action.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/s390/scsi/zfcp_erp.c

index d37c7331f244f1463c154a05ec9649306fe0c358..63422c13c7dab28c3da595325c5b877fcfd6e6b2 100644 (file)
@@ -156,6 +156,8 @@ static int zfcp_erp_required_act(int want, struct zfcp_adapter *adapter,
                if (!(a_status & ZFCP_STATUS_COMMON_RUNNING) ||
                      a_status & ZFCP_STATUS_COMMON_ERP_FAILED)
                        return 0;
+               if (p_status & ZFCP_STATUS_COMMON_NOESC)
+                       return need;
                if (!(a_status & ZFCP_STATUS_COMMON_UNBLOCKED))
                        need = ZFCP_ERP_ACTION_REOPEN_ADAPTER;
                /* fall through */