[Prism54-devel] Race in private ioctls
Denis Vlasenko
vda@port.imtp.ilyichevsk.odessa.ua
Sun, 22 Feb 2004 18:04:06 +0200
=46rom Changelog:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
2004-02-19
* isl_ioctl.c, islpci_dev.h: adds prism54_set_oid and prism54_get_oid.
Users of the old LDDK/ISL3890 driver can now just use the private
ioctl, example of how to use it provided in getoid and setoid scripts.
patch by Feyd <feyd@seznam.cz> -- I replaced "prism54" for ndev->name.
setoid:
=3D=3D=3D=3D=3D=3D
#!/bin/sh
args=3D`echo $@ | cut -d" " -f3-`
iwpriv $1 oid $2
iwpriv $1 set_oid $args
This is racy.
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?
=2D-
vda