Subject: Re: kern/36673: dubious code in sysmon_envsys
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Juan RP <juan@xtrarom.org>
List: netbsd-bugs
Date: 07/21/2007 12:20:03
The following reply was made to PR kern/36673; it has been noted by GNATS.
From: Juan RP <juan@xtrarom.org>
To: gnats-bugs@NetBSD.org
Cc: yamt@mwd.biglobe.ne.jp
Subject: Re: kern/36673: dubious code in sysmon_envsys
Date: Sat, 21 Jul 2007 14:16:45 +0200
On Sat, 21 Jul 2007 11:35:00 +0000 (UTC)
yamt@mwd.biglobe.ne.jp wrote:
> - sme_register_sensorname doesn't need to handle EMPTY case
> specially.
Fixed.
> - sme_make_dictionary should fully set up a dictionary before
> adding it to the array. (instead of leaving a partial
> dictionary on errors.)
> same for sysmon_envsys_createplist and its array.
Are you saying that only one error should destroy the whole array?
and why?
> - ENVSYS_FDUPDESC seems broken for compat ioctls.
It seems so and I'll fix.
> - what global mutexes like sme_mtx protect is not clear.
Not clear why? can you explain more?
> - 'obj' argument of sme_sensor_upstring (and similar
> functions) is useless.
Fixed.
> - '--sme->sme_nsensors' in sme_update_dictionary seems quite
> dubious.
Dubious, why? how do you want to skip sensors with duplicate
description, otherwise? let me know if you know any other way and I'll
fix.
> - 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.
I don't understand what you are reporting here.
--
Juan Romero Pardines - The NetBSD Project
http://plog.xtrarom.org - NetBSD/pkgsrc news in Spanish