Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1227633a authored by Mike Christie's avatar Mike Christie Committed by James Bottomley
Browse files

[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: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent bc7accec
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3914,7 +3914,8 @@ static void beiscsi_cleanup_task(struct iscsi_task *task)
			io_task->psgl_handle = NULL;
		}
	} else {
		if ((task->hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGIN)
		if (task->hdr &&
		   ((task->hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGIN))
			return;
		if (io_task->psgl_handle) {
			spin_lock(&phba->mgmt_sgl_lock);