diff options
author | rstone <rstone@FreeBSD.org> | 2011-11-08 15:17:54 +0000 |
---|---|---|
committer | rstone <rstone@FreeBSD.org> | 2011-11-08 15:17:54 +0000 |
commit | ae7b6414d5691d7d65c5b698558cb8a8f1e5b8de (patch) | |
tree | e6263adee26ad106ce8dfe30cdc3cbfe93d4d3c3 /sys/kern/kern_ctf.c | |
parent | a250a8c5aefb295529d2015e13b466f1a8b7e9a8 (diff) | |
download | FreeBSD-src-ae7b6414d5691d7d65c5b698558cb8a8f1e5b8de.zip FreeBSD-src-ae7b6414d5691d7d65c5b698558cb8a8f1e5b8de.tar.gz |
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
Diffstat (limited to 'sys/kern/kern_ctf.c')
-rw-r--r-- | sys/kern/kern_ctf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_ctf.c b/sys/kern/kern_ctf.c index bdff96e..2737860 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) { |