mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-16 03:39:04 +00:00
There is a NULL pointer dereference in case *slot* happens to be NULL at
lines 1053 and 1878:
struct hisi_sas_cq *cq =
&hisi_hba->cq[slot->dlvry_queue];
Notice that *slot* is being NULL checked at lines 1057 and 1881:
if (slot), which implies it may be NULL.
Fix this by placing the declaration and definition of variable cq, which
contains the pointer dereference slot->dlvry_queue, after slot has been
properly NULL checked.
Addresses-Coverity-ID: 1474515 ("Dereference before null check")
Addresses-Coverity-ID: 1474520 ("Dereference before null check")
Fixes:
|
||
|---|---|---|
| .. | ||
| hisi_sas_main.c | ||
| hisi_sas_v1_hw.c | ||
| hisi_sas_v2_hw.c | ||
| hisi_sas_v3_hw.c | ||
| hisi_sas.h | ||
| Kconfig | ||
| Makefile | ||