linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] brcm80211:Use proper skb wrapper function in the function brcmf_sdio_txpkt_postp
Date: Sun, 4 Oct 2015 23:01:33 +0200	[thread overview]
Message-ID: <561193AD.7080904@broadcom.com> (raw)
In-Reply-To: <1443846257-21038-1-git-send-email-xerofoify@gmail.com>

On 10/03/2015 06:24 AM, Nicholas Krause wrote:
> This uses the proper skb wrapper function sk_unlink in the function
> brcmf_sdio_txpkt_postp to properly protect against concurrent users
> accessing this skb_buff pointer or skb_buff_head pointer by locking
> the spinlock as part of the passed skb_buff_head's definition due to
> neither this function nor its callers locking this spinlock before
> calling skb_unlink in order to avoid possible concurrent access on
> either of these possibly shared structure pointers.
>
> 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..6b66542 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> @@ -2308,7 +2308,7 @@ brcmf_sdio_txpkt_postp(struct brcmf_sdio *bus, struct sk_buff_head *pktq)
>   				pkt_prev = pkt_next->prev;
>   				skb_put(pkt_prev, chop_len);
>   			}
> -			__skb_unlink(pkt_next, pktq);
> +			skb_unlink(pkt_next, pktq);

Not sure what issue you are trying to solve here. I am pretty sure I 
used __skb_unlink here on purpose. To my knowledge there is no 
concurrency issue so please elaborate. Your commit message seems a bit 
hypothetical.

Regards,
Arend

>   			brcmu_pkt_buf_free_skb(pkt_next);
>   		} else {
>   			hdr = pkt_next->data + bus->tx_hdrlen - SDPCM_SWHDR_LEN;
>


           reply	other threads:[~2015-10-04 21:01 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1443846257-21038-1-git-send-email-xerofoify@gmail.com>]

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=561193AD.7080904@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=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 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).