Skip to content

Commit

Permalink
pci server crashes during boot on Qubes OS
Browse files Browse the repository at this point in the history
I tried to launch Minix3 in Qubes OS. While there is no problem to boot
minix as a qube (in Qubes OS terminology) before 3641562, it fails with
the commit (and after). I didn't digg into PCI handling but this change
fixes the problem. Minix handles NULL case from pci_subclass_name.

Change-Id: I162424d92b613598e6eb845a71f90a02e31041db
  • Loading branch information
elewarr authored and sambuc committed Nov 16, 2017
1 parent 39d31d9 commit b2ee070
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sys/dev/pci/pci_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,11 @@ pci_subclass_name(pcireg_t reg)
subclassp++;
}

return subclassp->name;
if (subclassp) {
return subclassp->name;
} else {
return NULL;
}
}
#endif /* defined(__minix) && defined(_PCI_SERVER) */

Expand Down

0 comments on commit b2ee070

Please sign in to comment.