Skip the smap sysctl instead of panicing if no kernel metadata can be

found.

Submitted by:	bde
MFC after:	3 days
This commit is contained in:
John Baldwin 2014-10-30 17:58:57 +00:00
parent 4f8c17ab35
commit 39d22d86ab

View File

@ -3428,6 +3428,8 @@ smap_sysctl_handler(SYSCTL_HANDLER_ARGS)
kmdp = preload_search_by_type("elf kernel");
if (kmdp == NULL)
kmdp = preload_search_by_type("elf32 kernel");
if (kmdp == NULL)
return (0);
smapbase = (struct bios_smap *)preload_search_info(kmdp,
MODINFO_METADATA | MODINFOMD_SMAP);
if (smapbase == NULL)