Search Linux Wireless

Re: [RFC/RFT] ath9k_htc: fix race conditions when stop device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 21 Jan 2011 15:51:51 +0530
Sujith <m.sujith@xxxxxxxxx> wrote:

> Stanislaw Gruszka wrote:
> > Similar fix I already posted for ath9k. When stopping device, disable
> > interrupts, kill tasklets and then works, in correct order. Patch drop
> > mutex in them middle of a function, which I don't like and can possibly
> > not be correct. Perhaps this can be arranged differently. Also
> > there is no synchronize_irq, which IMHO should be added somewhere in
> > htc/wmi stop.
> 
> It should be okay if the work instances are canceled first before the mutex
> is acquired. 

IIRC, there is possibility to schedule priv->ps_work from ath9k_rx_tasklet (when
receive beacon frame and being in power save mode), so we should cancel that work
after assure tasklet will not be executed.

> And I don't think synchronize_irq() is required since this is a USB driver.
> 
> But when the driver is loaded and unloaded without bringing the interface up,
> stop() wouldn't be called at all, but I guess it's alright since no tasklet would
> have been scheduled. 

I assumed ath9k_htc_rxep() and ath9k_htc_txep() can not be called before _start()
(and after _stop() of course), hence removing tasklet_kill's from ath9k_deinit_priv()

> I tested with ath9k_htc and saw no issues.

Thanks!
Stanislaw
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux