On Monday 29 October 2007 01:06:51 David Ellingsworth wrote: > > - mutex_lock(&wl->mutex); > > + /* When RFKILL is registered, it will call back into this callback. > > + * wl->mutex will already be locked when this happens. > > + * So first trylock. On contention check if we are in initialization. > > + * Silently return if that happens to avoid a deadlock. */ > > + if (mutex_trylock(&wl->mutex) == 0) { > > + if (b43_status(dev) < B43_STAT_INITIALIZED) > > + return 0; > > + mutex_lock(&wl->mutex); > > + } > > if (b43_status(dev) < B43_STAT_INITIALIZED) > > goto out_unlock; > Why not replace everything above up to and including the "- > mutex_lock(&wl->mutex); with: > > if(b43_status(dev) < B43_STAT_INITIALIZED) > return 0; > > mutex_lock(&wl->mutex);
because the status should be queried under lock, of course. -- Greetings Michael. _______________________________________________ Bcm43xx-dev mailing list Bcm43xx-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/bcm43xx-dev