Skip to content

Commit fcdf0c7

Browse files
Allen PaisSomasundaram Krishnasamy
authored andcommitted
scsi: qla2xxx: fix a potential NULL pointer dereference
[ Upstream commit 35a79a6 ] alloc_workqueue is not checked for errors and as a result a potential NULL dereference could occur. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Allen Pais <[email protected]> Reviewed-by: Martin Wilck <[email protected]> Acked-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 3ee6a8bdae81a09c1dc9c27d3a50e6b1b6a24676) Orabug: 30618782 CVE: CVE-2019-16233 Signed-off-by: Larry Bassel <[email protected]> Reviewed-by: John Donnelly <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent c36ca7a commit fcdf0c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3287,6 +3287,10 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
32873287
"req->req_q_in=%p req->req_q_out=%p rsp->rsp_q_in=%p rsp->rsp_q_out=%p.\n",
32883288
req->req_q_in, req->req_q_out, rsp->rsp_q_in, rsp->rsp_q_out);
32893289
ha->wq = alloc_workqueue("qla2xxx_wq", 0, 0);
3290+
if (unlikely(!ha->wq)) {
3291+
ret = -ENOMEM;
3292+
goto probe_failed;
3293+
}
32903294

32913295
if (ha->isp_ops->initialize_adapter(base_vha)) {
32923296
ql_log(ql_log_fatal, base_vha, 0x00d6,

0 commit comments

Comments
 (0)