Re: [PATCH v2] staging: rtl8723bs: remove possible deadlock when disconnect

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

 



Hi All,

On 9/11/21 12:53 PM, Fabio Aiuto wrote:
> Hello Hans,
> 
> On Fri, Sep 10, 2021 at 11:06:58PM +0200, Hans de Goede wrote:
>> Hi,
> 
> <snip>
> 
>>
>> Thank you for your work on this. Overall this looks good.
>>
>> I have one remark, since now you are relying on the
>> sta->sleep_q.lock to protect the sleep_q data, you also
>> need to update the sleep_q accesses in rtw_free_stainfo()
>> specifically you need to add a spin_{lock,unlock}_bh(psta->sleep_q.lock)
>> around these lines:
>>
>>
>>         rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
>>         psta->sleepq_len = 0;
>>
>>
>> Note there also is a:
>>
>>         spin_lock_bh(&pxmitpriv->lock);
>>
>> Just above this which needs to be pushed down to below the
>> block which takes the psta->sleep_q.lock, so that the entire
>> thing ends up looking like this:
>>
>> 	spin_lock_bh(&psta->sleep_q.lock);
>>         rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
>>         psta->sleepq_len = 0;
>> 	spin_unlock_bh(&psta->sleep_q.lock);
>>
>>         spin_lock_bh(&pxmitpriv->lock);
>>
>> Other then that this patch looks good, thanks.
>>
>> Regards,
>>
>> Hans
>>
> 
> good catch, thanks a lot for review.
> 
> Greg, I see that this one is not in staging-next,
> would you drop it so I can send a new one?
> Or shall I send a Fixes: patch?

Ah I missed that this was already merged. Since this is already merged
the issue which I noticed should be fixed with a separate follow-up
patch (with a Fixes: tag, thanks.

Regards,

Hans





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux