diff options
author | Himanshu Madhani <himanshu.madhani@qlogic.com> | 2014-09-25 06:14:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-30 09:40:12 -0700 |
commit | 3935cbbc2aec1e833431d7862068793932dcc72e (patch) | |
tree | c5a1c385b8c156cdf140a1e924cc18a5b6853807 /drivers | |
parent | a117f1112ea0e5523a5293e7aa391abb4f2bbea8 (diff) |
qla2xxx: fix kernel NULL pointer access
commit 78c2106a50e067f7168ee8c0944baaeb0e988272 upstream.
This patch is to fix regression added by commit id
51a07f84649d2be206c4c2ad9a612956db0c2f8c.
When allocating memory for new session original patch does
not assign vha to op->vha resulting into NULL pointer
access during qlt_create_sess_from_atio().
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index e632e14180cf..e44fcb53bdac 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -3277,6 +3277,7 @@ static int qlt_handle_cmd_for_atio(struct scsi_qla_host *vha, return -ENOMEM; memcpy(&op->atio, atio, sizeof(*atio)); + op->vha = vha; INIT_WORK(&op->work, qlt_create_sess_from_atio); queue_work(qla_tgt_wq, &op->work); return 0; |