From 956b2101c9432f9ffd9bea75e543a168c48f3d3e Mon Sep 17 00:00:00 2001 From: rstone Date: Fri, 25 Nov 2011 12:43:34 +0000 Subject: [PATCH] MFC r227342. Note that the original commit message, reproduced below, has error. The final sentence should read "*without* CTF data". 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. Approved by: re (kib) git-svn-id: svn://svn.freebsd.org/base/releng/9.0@227969 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/kern/kern_ctf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ctf.c b/sys/kern/kern_ctf.c index bdff96ed..27378601 100644 --- a/sys/kern/kern_ctf.c +++ b/sys/kern/kern_ctf.c @@ -90,7 +90,7 @@ link_elf_ctf_get(linker_file_t lf, linker_ctf_t *lc) * 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) { -- 2.42.0