[Prism54-devel] Race in private ioctls

Feyd feyd@seznam.cz
Sun, 22 Feb 2004 23:52:27 +0100


On Sun, 22 Feb 2004 18:04:06 +0200
Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> wrote:

> setoid:
> ======
> #!/bin/sh
> args=`echo $@ | cut -d" " -f3-`
> iwpriv $1 oid $2
> iwpriv $1 set_oid $args
> 
> This is racy.

True.

> 
> I think we need different interface here, like this:
> 
> # iwpriv eth1 gPROFILES
> eth1      gPROFILES:1
> # iwpriv eth1 sPROFILES 0
> 
> No races, and referencing OIDs by name and not by number is
> easier for humans.
> 
> Is anything wrong with such interface?

Only 32 private ioctls available, handles only oids known at compile
time. While regular users will need something more fiendly to controll
al the fetaures, this is an easy way to discover how each oid works
for people interested in implemeting new features or tweaking the
card.

Feyd