From owner-freebsd-current Tue Jul 9 5:47:46 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8580537B401 for ; Tue, 9 Jul 2002 05:47:31 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A86743E42 for ; Tue, 9 Jul 2002 05:47:31 -0700 (PDT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 045FBAE147; Tue, 9 Jul 2002 05:47:31 -0700 (PDT) Date: Tue, 9 Jul 2002 05:47:30 -0700 From: Maxime Henrion To: current@FreeBSD.org Cc: Don Lewis Subject: Re: /usr/src/sys/vm/uma_core.c:1332: could sleep with "kernel linker" locked from /usr/src/sys/kern/kern_linker.c:1797 Message-ID: <20020709124730.GF42325@elvis.mu.org> References: <200207091156.g69BuBwr003693@gw.catspoiler.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200207091156.g69BuBwr003693@gw.catspoiler.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Don Lewis wrote: > I recently started seeing the warning message: > > /usr/src/sys/vm/uma_core.c:1332: could sleep with "kernel linker" locked > from /usr/src/sys/kern/kern_linker.c:1797 > > at boot time on my -current box. It appears to be related to the > changes in rev 1.90 of kern_linker.c. > > I suspect that memory is getting allocted inside this loop in > sysctl_kern_function_list(): > > mtx_lock(&kld_mtx); > TAILQ_FOREACH(lf, &linker_files, link) { > error = LINKER_EACH_FUNCTION_NAME(lf, > sysctl_kern_function_list_iterate, req); > if (error) { > mtx_unlock(&kld_mtx); > return (error); > } > } > mtx_unlock(&kld_mtx); > > but I got lost in a maze of twisty little passages. > > And where the heck is LINKER_EACH_FUNCTION_NAME defined? This is the > only occurence of this string in the entire /usr/src tree ... It's defined in linker_if.h, which is a generated header, which is why you can't find it in the source tree. This macro calls a kobj function, which might call malloc(). That's why you're getting the warning. Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message