mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
target: fix use after free in target_report_luns
Fix possible NULL pointer dereference in target_report_luns failure path. Signed-off-by: Joern Engel <[email protected]> Cc: [email protected] Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
parent
6cf3fa6918
commit
382436f880
1 changed files with 1 additions and 1 deletions
|
|
@ -690,12 +690,12 @@ int target_report_luns(struct se_task *se_task)
|
|||
* See SPC3 r07, page 159.
|
||||
*/
|
||||
done:
|
||||
transport_kunmap_data_sg(se_cmd);
|
||||
lun_count *= 8;
|
||||
buf[0] = ((lun_count >> 24) & 0xff);
|
||||
buf[1] = ((lun_count >> 16) & 0xff);
|
||||
buf[2] = ((lun_count >> 8) & 0xff);
|
||||
buf[3] = (lun_count & 0xff);
|
||||
transport_kunmap_data_sg(se_cmd);
|
||||
|
||||
se_task->task_scsi_status = GOOD;
|
||||
transport_complete_task(se_task, 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue