]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Gerald Schaefer <geraldsc@de.ibm.com> |
2 | Subject: zfcp: invalid return value on failing fsf_req creation | |
3 | References: bnc#450096 | |
4 | ||
5 | Symptom: I/O stops unrecoverably | |
6 | Problem: An ERR_PTR is returned where a NULL value is expected | |
7 | Solution: Fix the two instances | |
8 | ||
9 | Acked-by: John Jolly <jjolly@suse.de> | |
10 | --- | |
11 | drivers/s390/scsi/zfcp_fsf.c | 8 ++++++-- | |
12 | 1 file changed, 6 insertions(+), 2 deletions(-) | |
13 | ||
14 | Index: linux-sles11/drivers/s390/scsi/zfcp_fsf.c | |
15 | =================================================================== | |
16 | --- linux-sles11.orig/drivers/s390/scsi/zfcp_fsf.c | |
17 | +++ linux-sles11/drivers/s390/scsi/zfcp_fsf.c | |
18 | @@ -932,8 +932,10 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_ | |
19 | goto out; | |
20 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_ABORT_FCP_CMND, | |
21 | req_flags, adapter->pool.fsf_req_abort); | |
22 | - if (IS_ERR(req)) | |
23 | + if (IS_ERR(req)) { | |
24 | + req = NULL; | |
25 | goto out; | |
26 | + } | |
27 | ||
28 | if (unlikely(!(atomic_read(&unit->status) & | |
29 | ZFCP_STATUS_COMMON_UNBLOCKED))) | |
30 | @@ -2448,8 +2450,10 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_c | |
31 | goto out; | |
32 | req = zfcp_fsf_req_create(adapter, FSF_QTCB_FCP_CMND, req_flags, | |
33 | adapter->pool.fsf_req_scsi); | |
34 | - if (IS_ERR(req)) | |
35 | + if (IS_ERR(req)) { | |
36 | + req = NULL; | |
37 | goto out; | |
38 | + } | |
39 | ||
40 | req->status |= ZFCP_STATUS_FSFREQ_TASK_MANAGEMENT; | |
41 | req->data = unit; |