Andy Chou :
> Here are some more results from the MC project. These are 16 errors found
> in 2.4.1 related to inconsistent use of locks. As usual, if you can
> verify any of these or show that they are false positives, please let us
> know by CC'ing mc@cs.stanford.edu.
>
> -Andy Chou
>
> -----------------------------------------------------------------------------
>
> [BUG] error condition
> /u2/acc/oses/linux/2.4.1/drivers/net/pcmcia/wavelan_cs.c:2561:wavelan_get_wireless_stats:
> ERROR:LOCK:2528:2561: Inconsistent
> lock using `spin_lock':2528
>
> static iw_stats *
> wavelan_get_wireless_stats(device * dev)
> {
> ...
> --> Lock
> spin_lock_irqsave (&lp->lock, flags);
>
> if(lp == (net_local *) NULL)
> --> Missing unlock?
> return (iw_stats *) NULL;
>
> -----------------------------------------------------------------------------
Thanks for the hint (actually, also thanks to LWN for
reporting this, I don't read the list).
At first, I felt offended to have such an obvious bug in my
driver, and then I check the master copy of the driver in the Pcmcia
package that I maintain, and it doesn't contain this bug. So whoever
did the port from Pcmcia -> kernel introduced this one :-(
Patch attached. Have fun...
Jean
This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:18 EST