resource_xxx lookups fail to find dyanmic kernel environment changes due to subr_hints bug

Harry Coin harrycoin at qconline.com
Mon Jul 18 19:29:45 GMT 2005


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



More information about the freebsd-current mailing list