From owner-svn-src-head@FreeBSD.ORG Tue Nov 8 15:17:55 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F731106564A; Tue, 8 Nov 2011 15:17:55 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F7728FC12; Tue, 8 Nov 2011 15:17:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA8FHtZO036982; Tue, 8 Nov 2011 15:17:55 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA8FHtdF036980; Tue, 8 Nov 2011 15:17:55 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201111081517.pA8FHtdF036980@svn.freebsd.org> From: Ryan Stone Date: Tue, 8 Nov 2011 15:17:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227342 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2011 15:17:55 -0000 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) {