Skip to content

Commit

Permalink
qla2xxx: fix kernel NULL pointer access
Browse files Browse the repository at this point in the history
This patch is to fix regression added by commit id
51a07f8.

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().

Cc: <stable@vger.kernel.org>
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>
  • Loading branch information
Himanshu Madhani authored and Christoph Hellwig committed Sep 25, 2014
1 parent 4d6609c commit 78c2106
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/qla2xxx/qla_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 78c2106

Please sign in to comment.