From: Arend van Spriel <arend@broadcom.com>
To: Nicholas Krause <xerofoify@gmail.com>, <brudley@broadcom.com>
Cc: <frankyl@broadcom.com>, <meuleman@broadcom.com>,
<kvalo@codeaurora.org>, <pieterpg@broadcom.com>,
<linux-wireless@vger.kernel.org>,
<brcm80211-dev-list@broadcom.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] brcm80211:Fix locking region in the function brcmf_sdio_sendfromq
Date: Sun, 4 Oct 2015 22:54:37 +0200 [thread overview]
Message-ID: <5611920D.60500@broadcom.com> (raw)
In-Reply-To: <1443889148-22678-1-git-send-email-xerofoify@gmail.com>
On 10/03/2015 06:19 PM, Nicholas Krause wrote:
> This fixes the locking region in the function brcmf_sdio_sendfromq
> to properly lock around the call to the function brcmrf_sdio_txpkt
> in order to avoid concurrent access issues when calling this
> function as stated in the function's comments about the caller
> being required to lock around the call to this particular function.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> index f990e3d..da59683 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> @@ -2388,11 +2388,11 @@ static uint brcmf_sdio_sendfromq(struct brcmf_sdio *bus, uint maxframes)
> break;
> __skb_queue_tail(&pktq, pkt);
> }
> - spin_unlock_bh(&bus->txq_lock);
> if (i == 0)
> break;
So what if we break here. Seems you need to do unlock if i == 0 here.
Regards,
Arend
>
> ret = brcmf_sdio_txpkt(bus, &pktq, SDPCM_DATA_CHANNEL);
> + spin_unlock_bh(&bus->txq_lock);
>
> cnt += i;
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Arend van Spriel <arend-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
To: Nicholas Krause
<xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
<brudley-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: <frankyl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
<meuleman-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
<kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
<pieterpg-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
<linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<brcm80211-dev-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] brcm80211:Fix locking region in the function brcmf_sdio_sendfromq
Date: Sun, 4 Oct 2015 22:54:37 +0200 [thread overview]
Message-ID: <5611920D.60500@broadcom.com> (raw)
In-Reply-To: <1443889148-22678-1-git-send-email-xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 10/03/2015 06:19 PM, Nicholas Krause wrote:
> This fixes the locking region in the function brcmf_sdio_sendfromq
> to properly lock around the call to the function brcmrf_sdio_txpkt
> in order to avoid concurrent access issues when calling this
> function as stated in the function's comments about the caller
> being required to lock around the call to this particular function.
>
> Signed-off-by: Nicholas Krause <xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> index f990e3d..da59683 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> @@ -2388,11 +2388,11 @@ static uint brcmf_sdio_sendfromq(struct brcmf_sdio *bus, uint maxframes)
> break;
> __skb_queue_tail(&pktq, pkt);
> }
> - spin_unlock_bh(&bus->txq_lock);
> if (i == 0)
> break;
So what if we break here. Seems you need to do unlock if i == 0 here.
Regards,
Arend
>
> ret = brcmf_sdio_txpkt(bus, &pktq, SDPCM_DATA_CHANNEL);
> + spin_unlock_bh(&bus->txq_lock);
>
> cnt += i;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next parent reply other threads:[~2015-10-04 20:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1443889148-22678-1-git-send-email-xerofoify@gmail.com>
2015-10-04 20:54 ` Arend van Spriel [this message]
2015-10-04 20:54 ` [PATCH] brcm80211:Fix locking region in the function brcmf_sdio_sendfromq Arend van Spriel
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=5611920D.60500@broadcom.com \
--to=arend@broadcom.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=brudley@broadcom.com \
--cc=frankyl@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=meuleman@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pieterpg@broadcom.com \
--cc=xerofoify@gmail.com \
/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.