Subject: kern/36673: dubious code in sysmon_envsys
To: None <firstname.lastname@example.org, email@example.com,>
From: None <firstname.lastname@example.org>
Date: 07/21/2007 11:35:00
>Synopsis: dubious code is sysmon_envsys
>Arrival-Date: Sat Jul 21 11:35:00 +0000 2007
>Originator: YAMAMOTO Takashi <email@example.com>
>Release: NetBSD 4.99.24
- sme_register_sensorname doesn't need to handle EMPTY case specially.
- sme_make_dictionary should fully set up a dictionary before
adding it to the array. (instead of leaving a partial dictionary
same for sysmon_envsys_createplist and its array.
- ENVSYS_FDUPDESC seems broken for compat ioctls.
- what global mutexes like sme_mtx protect is not clear.
- 'obj' argument of sme_sensor_upstring (and similar functions)
- '--sme->sme_nsensors' in sme_update_dictionary seems quite dubious.
- sysmon_envsys_createplist seems to ignore most errors
unless it was for the last sensor in sme_sensor_data.
i don't understand why the last one is special.