[PATCH] scsi: hisi_sas: add null check before indirect pointer dereference

2017-05-22 Thread Gustavo A. R. Silva
Add null check before indirectly dereferencing pointer task->lldd_task in statement u32 tag = slot->idx; Addresses-Coverity-ID: 1373843 Signed-off-by: Gustavo A. R. Silva --- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hi

Re: [PATCH] scsi: hisi_sas: add null check before indirect pointer dereference

2017-05-23 Thread John Garry
On 22/05/2017 19:00, Gustavo A. R. Silva wrote: Add null check before indirectly dereferencing pointer task->lldd_task in statement u32 tag = slot->idx; I don't think that this is a valid scenario, but protecting against a possible NULL dereference is prudent. Thanks Addresses-Coverity-ID:

Re: [PATCH] scsi: hisi_sas: add null check before indirect pointer dereference

2017-05-23 Thread Martin K. Petersen
Gustavo A., > Add null check before indirectly dereferencing pointer task->lldd_task > in statement u32 tag = slot->idx; Applied to 4.13/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering