summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@fingolfin.org>2021-11-12 15:19:28 -0800
committerRobert Mustacchi <rm@fingolfin.org>2022-01-15 18:40:54 +0000
commit39c0b5e4200a84f97338ca1d3c81e5f81af49f70 (patch)
treeaba623a0bb13f90db0d7619f6019367496a41db2 /usr/src/uts/intel
parente0cd43fe10732fee98e49dcb194f13ded2d5b660 (diff)
downloadillumos-gate-39c0b5e4200a84f97338ca1d3c81e5f81af49f70.tar.gz
14366 list_is_vga_only() can't handle empty memlists
Reviewed by: Yuri Pankov <ypankov@tintri.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/intel')
-rw-r--r--usr/src/uts/intel/io/pci/pci_boot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/src/uts/intel/io/pci/pci_boot.c b/usr/src/uts/intel/io/pci/pci_boot.c
index b51bc84978..f2cff30ed3 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);