Search Linux Wireless

Re: [PATCH 1/5] ath9k_htc: Protect RX stream variables

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

 



2010/4/7 Sujith <Sujith.Manoharan@xxxxxxxxxxx>:
> Ming Lei wrote:
>> 2010/4/6 Sujith <Sujith.Manoharan@xxxxxxxxxxx>:
>> > Use a spin lock to prevent concurrent access
>> > to variables dealing with RX stream mode handling.
>>
>> which variables are needed to be protected?
>>
>> It seems hif_dev->rx_transfer_len, hif_dev->remain_skb
>> and hif_dev->rx_pkt_len are only accessed in ath9k_hif_usb_rx_stream,
>> which is only called in hard irq(urb->complete) context and now is
>> serialized strictly, so the protection is useless, isn't it?
>
> On a SMP machine, the RX callback can run on two CPUs, in this case,
> appropriate protection is needed between the two hard-irq handlers.

I am not sure if the same irq handler can run concurrently on different CPUs.
Even though it is, ehci/uhci handler have done such protection, so it
is not necessary to add such protection in the complete handler of usb
interface driver.

>
>> > Currently, no protection is implemented - which
>> > causes problems in RX.
>>
>> which problems? Could you describe them in detail?
>
> The RX stream position-hooks would get mangled up if two
> IRQ handlers access them without any kind of protection.
> This corrupts the stream data - causing data loss.
>
> Sujith
>



-- 
Lei Ming
--
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