svn commit: r227342 - head/sys/kern

Ryan Stone rstone at FreeBSD.org
Tue Nov 8 15:17:55 UTC 2011


Author: rstone
Date: Tue Nov  8 15:17:54 2011
New Revision: 227342
URL: http://svn.freebsd.org/changeset/base/227342

Log:
  The in-kernel CTF parser caches the result of its first attempt to parse
  CTF data from a module.  On subsequent attempts to retrieve CTF data for
  a module, return an error if there no CTF data.
  
  This fixes a panic if you try to enable fbt probes on a module with CTF
  data twice.
  
  Submitted by:	Paul Ambrose (ambrosehua AT gmail DOT com)
  MFC after:	3 days

Modified:
  head/sys/kern/kern_ctf.c

Modified: head/sys/kern/kern_ctf.c
==============================================================================
--- head/sys/kern/kern_ctf.c	Tue Nov  8 14:47:28 2011	(r227341)
+++ head/sys/kern/kern_ctf.c	Tue Nov  8 15:17:54 2011	(r227342)
@@ -90,7 +90,7 @@ link_elf_ctf_get(linker_file_t lf, linke
 	 * ctfcnt to -1. See below.
 	 */
 	if (ef->ctfcnt < 0)
-		return (0);
+		return (EFTYPE);
 
 	/* Now check if we've already loaded the CTF data.. */
 	if (ef->ctfcnt > 0) {


More information about the svn-src-all mailing list