Search Linux Wireless

Re: [PATCH 11/13] rt2x00: Fix crash on USB unplug

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

 



Hi,

On Fri, Nov 5, 2010 at 1:07 AM, Blaise Gassend <blaise@xxxxxxxxxxxxxxxx> wrote:
>>> Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>
>>> Acked-by: Gertjan van Wingerde <gwingerde@xxxxxxxxx>
>>> ---
>>> diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
>>> index a5c7a4f..b6822cd 100644
>>> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
>>> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
>>> @@ -483,6 +483,10 @@ void rt2x00lib_rxdone(struct queue_entry *entry)
>>>        unsigned int header_length;
>>>        int rate_idx;
>>>
>>> +       if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
>>> +           !test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
>>> +               goto submit_entry;
>>> +
>>>        if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags))
>>>                goto submit_entry;
>>>
>>
>> Could these two if statements be combined?

They can, but I wanted the separation for clarity, the first
if-statement checks the
device state, while the second if-statement is for the frame itself.

> I'm also worried that the crash may still happen when the second if
> causes a jump. So far I am still getting crashes with this patch in.

I don't see how this could cause a crash, I know there are still issues
around this function, but how can the usage of 2 if-statement cause a crash?

Ivo
--
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