From owner-freebsd-current@FreeBSD.ORG Mon Jul 18 19:29:45 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 639B516A41C for ; Mon, 18 Jul 2005 19:29:45 +0000 (GMT) (envelope-from harrycoin@qconline.com) Received: from mail.qconline.com (mail.qconline.com [204.176.110.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13A1743D45 for ; Mon, 18 Jul 2005 19:29:44 +0000 (GMT) (envelope-from harrycoin@qconline.com) Received: from devoffice.qconline.com (unverified [64.4.171.82]) by mail.qconline.com (Vircom SMTPRS 3.1.302.0) with ESMTP id for ; Mon, 18 Jul 2005 14:30:30 -0500 Message-Id: <4.3.2.7.2.20050718142506.01ef94f8@mail.qconline.com> X-Sender: harrycoin@mail.qconline.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Mon, 18 Jul 2005 14:29:37 -0500 To: freebsd-current@freebsd.org From: Harry Coin Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: resource_xxx lookups fail to find dyanmic kernel environment changes due to subr_hints bug X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2005 19:29:45 -0000 When the kernel environment goes to dynamic from static hints mode, the a bug in the resource_xxx lookup routines prevent them from using the dynamic environment. So they only report as of the static environment, while the kenv related routines report what's in the new environment. This can lead to very messy symptoms. The subr_hints.c file tries to detect when the kernel environment changes state. But there's a bug in that. Update below has been tested. --- /usr/src/sys/kern/subr_hints.c Sun Mar 13 12:05:26 2005 +++ /mnt/server1/usr/src/sys/kern/subr_hints.c Mon Jul 18 13:53:02 2005 @@ -61,6 +61,7 @@ char *p; if (checkmethod) { + hintp=NULL; switch (hintmode) { case 0: /* loader hints in environment only */ break; Harry