1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00

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
This commit is contained in:
Ryan Stone 2011-11-08 15:17:54 +00:00
parent 6d31bbad83
commit 6f6924e5a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227342

View File

@ -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) {