]> git.ipfire.org Git - people/ms/linux.git/commitdiff
qla2xxx: fix kernel NULL pointer access
authorHimanshu Madhani <himanshu.madhani@qlogic.com>
Thu, 25 Sep 2014 10:14:44 +0000 (06:14 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 16:43:07 +0000 (09:43 -0700)
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>
drivers/scsi/qla2xxx/qla_target.c

index e632e14180cf5f6b757980ffc66365c3e31d3e19..e44fcb53bdacaacc3fa4ce461aeb6a32deaa0fdc 100644 (file)
@@ -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;