mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[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 <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
bc7accec87
commit
1227633a44
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue