aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2010-12-31 03:22:20 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-31 10:52:42 -0500
commit1227633a441363642cdbaf38c4241d071e917095 (patch)
tree51b7ec4bc1d56b103bf74c5273a0d2b0e70abf70 /drivers
parentbc7accec8788ada4f459461194c2b8fad94ed239 (diff)
[SCSI] be2iscsi: fix null ptr when accessing task hdr
If alloc_pdu fails then the task->hdr pointer may not be set. This adds a check for this case in the cleanup callback. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index be07ca06177e..79cefbe31367 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -3914,7 +3914,8 @@ static void beiscsi_cleanup_task(struct iscsi_task *task)
3914 io_task->psgl_handle = NULL; 3914 io_task->psgl_handle = NULL;
3915 } 3915 }
3916 } else { 3916 } else {
3917 if ((task->hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGIN) 3917 if (task->hdr &&
3918 ((task->hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGIN))
3918 return; 3919 return;
3919 if (io_task->psgl_handle) { 3920 if (io_task->psgl_handle) {
3920 spin_lock(&phba->mgmt_sgl_lock); 3921 spin_lock(&phba->mgmt_sgl_lock);