Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Oct 2014 17:58:58 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273871 - head/sys/i386/i386
Message-ID:  <201410301758.s9UHww31057290@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Oct 30 17:58:57 2014
New Revision: 273871
URL: https://svnweb.freebsd.org/changeset/base/273871

Log:
  Skip the smap sysctl instead of panicing if no kernel metadata can be
  found.
  
  Submitted by:	bde
  MFC after:	3 days

Modified:
  head/sys/i386/i386/machdep.c

Modified: head/sys/i386/i386/machdep.c
==============================================================================
--- head/sys/i386/i386/machdep.c	Thu Oct 30 17:14:51 2014	(r273870)
+++ head/sys/i386/i386/machdep.c	Thu Oct 30 17:58:57 2014	(r273871)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410301758.s9UHww31057290>