lkml.org 
[lkml]   [2021]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] staging: rtl8723bs: remove possible deadlock when disconnect
From
Date
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

\
 
 \ /
  Last update: 2021-09-11 13:35    [W:0.101 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site