Subject: Re: kern/36659: Occasional problems with envsys with aiboost
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Juan RP <juan@xtrarom.org>
List: netbsd-bugs
Date: 07/17/2007 09:20:02
The following reply was made to PR kern/36659; it has been noted by GNATS.

From: Juan RP <juan@xtrarom.org>
To: Geoff Wing <gcw@pobox.com>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/36659: Occasional problems with envsys with aiboost
Date: Tue, 17 Jul 2007 11:03:43 +0200

 On Tue, 17 Jul 2007 18:27:58 +1000
 Geoff Wing <gcw@pobox.com> wrote:
 
 > Yes, I had automatically done "/etc/rc.d/envsys restart"
 > 
 > And I'm running multi-CPU on a Pentium-D system.
 
 Let's see if that makes a difference, can you please try this patch?
 
 
 Index: sysmon_envsys.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/sysmon/sysmon_envsys.c,v
 retrieving revision 1.21
 diff -b -u -r1.21 sysmon_envsys.c
 --- sysmon_envsys.c     16 Jul 2007 17:48:52 -0000      1.21
 +++ sysmon_envsys.c     17 Jul 2007 09:02:39 -0000
 @@ -949,6 +949,7 @@
                 return EINVAL;
         }
  
 +       mutex_enter(&sme_mtx);
         /* iterate over the sensors to find the right one */
         for (i = 0; i < sme->sme_nsensors; i++) {
                 edata = &sme->sme_sensor_data[i];
 @@ -1103,5 +1104,6 @@
                 error = EINVAL;
  
  out:
 +       mutex_exit(&sme_mtx);
         return error;
  }
 
 
 -- 
 Juan Romero Pardines	- The NetBSD Project
 http://plog.xtrarom.org	- NetBSD/pkgsrc news in Spanish