]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.fixes/qla2xxx-check-fc-rport-validity
Revert "Move xen patchset to new version's subdir."
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / qla2xxx-check-fc-rport-validity
CommitLineData
00e5a55c
BS
1From 159c5e2fff12fc75220597fa2434ab0d0c07b337 Mon Sep 17 00:00:00 2001
2From: Seokmann Ju <sju@elab55.qlogic.com>
3Date: Thu, 22 Jan 2009 10:25:39 -0800
4Subject: [PATCH] qla2xxx: added to check fcport is valid in qla2x00_terminate_rport_io().
5References: bnc#467624
6
7As to follow the recent changes in FC transport layer, qla2xxx module
8added a checker to make sure that fcport is being accessed is valid.
9- qla2x00_dev_loss_tmo_callbk()
10- qla2x00_terminate_rport_io()
11Following is SHA # for the FC transport layer changes,
12[SCSI] fc transport: pre-emptively terminate i/o upon dev_loss_tmo timeout
13(f78badb1ae07e7f8b835ab2ea0b456ed3fc4caf4)
14With the FC transport layer change, there is a possibility for qla2xxx
15module to take both dev_loss_tmo_callbk() and terminate_rport_io() repeatedly
16for a fcport, so that the checker is needed to make sure that the module
17won't access fcport if it has done so.
18
19Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
20Signed-off-by: Hannes Reinecke <hare@suse.de>
21---
22 drivers/scsi/qla2xxx/qla_attr.c | 6 ++++++
23 1 files changed, 6 insertions(+), 0 deletions(-)
24
25diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
26index 6d5210e..34c4016 100644
27--- a/drivers/scsi/qla2xxx/qla_attr.c
28+++ b/drivers/scsi/qla2xxx/qla_attr.c
29@@ -1284,6 +1284,9 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
30 struct Scsi_Host *host = rport_to_shost(rport);
31 fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
32
33+ if (!fcport)
34+ return;
35+
36 qla2x00_abort_fcport_cmds(fcport);
37
38 /*
39@@ -1301,6 +1304,9 @@ qla2x00_terminate_rport_io(struct fc_rport *rport)
40 {
41 fc_port_t *fcport = *(fc_port_t **)rport->dd_data;
42
43+ if (!fcport)
44+ return;
45+
46 /*
47 * At this point all fcport's software-states are cleared. Perform any
48 * final cleanup of firmware resources (PCBs and XCBs).
49--
501.6.0
51