All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: gregkh@linuxfoundation.org, Larry.Finger@lwfinger.net,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: protect sleepq_len access by sleep_q.lock
Date: Mon, 13 Sep 2021 15:39:16 +0200	[thread overview]
Message-ID: <20210913133915.GA1414@agape.jhs> (raw)
In-Reply-To: <d6d6c6bf-b787-aac9-4767-4bf54c5437ac@redhat.com>

Hello Hans,

On Mon, Sep 13, 2021 at 03:24:44PM +0200, Hans de Goede wrote:
> Hi Fabio,
> 
 
> > Note that sleep_q.lock is already taken inside
> > rtw_free_xmitframe_queue so we just wrap sleepq_len
> > access.
> > 
> > Moved pxmitpriv->lock after sleep_q.lock release to
> > avoid locks nesting.

> >  	rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
> > +	spin_lock_bh(&psta->sleep_q.lock);
> 
> AFAICT this needs to be above the rtw_free_xmitframe_queue() ?

as I wrote on the changelog, the sleep_q.lock is already
taken inside rtw_free_xmitframe_queue. If I put the
sleep_q.lock above that function a soft lock occurs when
I disconnect.

So I put it just below rtw_free_xmitframe_queue.

Things works fine this way.

Please tell me if there's a best way to do it.

> 
> Regards,
> 
> Hans

thank you,

fabio

  reply	other threads:[~2021-09-13 13:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 13:03 [PATCH] staging: rtl8723bs: protect sleepq_len access by sleep_q.lock Fabio Aiuto
2021-09-13 13:24 ` Hans de Goede
2021-09-13 13:39   ` Fabio Aiuto [this message]
2021-09-13 15:12     ` Hans de Goede
2021-09-17 14:25       ` Greg KH
2021-09-17 14:27         ` Fabio Aiuto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210913133915.GA1414@agape.jhs \
    --to=fabioaiuto83@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.