From 39c0b5e4200a84f97338ca1d3c81e5f81af49f70 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Fri, 12 Nov 2021 15:19:28 -0800 Subject: [PATCH] 14366 list_is_vga_only() can't handle empty memlists Reviewed by: Yuri Pankov Reviewed by: Toomas Soome Approved by: Dan McDonald --- usr/src/uts/intel/io/pci/pci_boot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr/src/uts/intel/io/pci/pci_boot.c b/usr/src/uts/intel/io/pci/pci_boot.c index b51bc849786e..f2cff30ed3d1 100644 --- a/usr/src/uts/intel/io/pci/pci_boot.c +++ b/usr/src/uts/intel/io/pci/pci_boot.c @@ -1051,6 +1051,10 @@ is_vga(struct memlist *elem, enum io_mem io) static boolean_t list_is_vga_only(struct memlist *l, enum io_mem io) { + if (l == NULL) { + return (B_FALSE); + } + do { if (!is_vga(l, io)) return (B_FALSE);