> On Mar 26, 2019, at 3:44 AM, Christoph Badura <[email protected]> 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

Reply via email to