* Re: [PATCH] brcm80211:Fix locking region in the function brcmf_sdio_sendfromq
[not found] ` <1443889148-22678-1-git-send-email-xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-10-04 20:54 ` Arend van Spriel
0 siblings, 0 replies; only message in thread
From: Arend van Spriel @ 2015-10-04 20:54 UTC (permalink / raw)
To: Nicholas Krause, brudley-dY08KVG/lbpWk0Htik3J/w
Cc: frankyl-dY08KVG/lbpWk0Htik3J/w, meuleman-dY08KVG/lbpWk0Htik3J/w,
kvalo-sgV2jX0FEOL9JmXXK+q4OQ, pieterpg-dY08KVG/lbpWk0Htik3J/w,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
brcm80211-dev-list-dY08KVG/lbpWk0Htik3J/w,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-04 20:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1443889148-22678-1-git-send-email-xerofoify@gmail.com>
[not found] ` <1443889148-22678-1-git-send-email-xerofoify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-04 20:54 ` [PATCH] brcm80211:Fix locking region in the function brcmf_sdio_sendfromq Arend van Spriel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).