Date: Tue, 9 Jul 2002 05:47:30 -0700 From: Maxime Henrion <mux@freebsd.org> To: current@FreeBSD.org Cc: Don Lewis <dl-freebsd@catspoiler.org> 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> In-Reply-To: <200207091156.g69BuBwr003693@gw.catspoiler.org> References: <200207091156.g69BuBwr003693@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020709124730.GF42325>