Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: panic in sysmon_envsys_unregister()




> On Mar 26, 2019, at 3:44 AM, Christoph Badura <bad%bsd.de@localhost> wrote:
> 
> This is caught by QUEUEDEBUG.
> 
> This is the relevant code in sys/dev/sysmon/sysmon_envsys.c:sysmon_envsys_unregister()
> 
> 	TAILQ_FOREACH(edata, &sme->sme_sensors_list, sensors_head) {
> 		sysmon_envsys_sensor_detach(sme, edata);
> 	}
> 
> sysmon_envsys_sensor_detach() TAILQ_FOREACHs over sme_sensors_list itself
> and removes edata.
> 
> Is using TAILQ_FOREACH_SAFE in sysmon_envsys_unregister() the right fix?

Either that or a TAILQ_FIRST() each time.

-- thorpej



Home | Main Index | Thread Index | Old Index