All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: "Wei Yongjun" <weiyj.lk@gmail.com>
Cc: brudley@broadcom.com, frankyl@broadcom.com,
	meuleman@broadcom.com, linville@tuxdriver.com,
	pieterpg@broadcom.com, phaber@broadcom.com,
	yongjun_wei@trendmicro.com.cn, linux-wireless@vger.kernel.org,
	brcm80211-dev-list@broadcom.com
Subject: Re: [PATCH -next] brcmfmac: fix potential NULL pointer dereference in brcmf_fws_flow_control_check()
Date: Fri, 19 Apr 2013 10:12:58 +0200	[thread overview]
Message-ID: <5170FC8A.5020306@broadcom.com> (raw)
In-Reply-To: <CAPgLHd8KiH+BGZJ704yk2ZsiVQC8GH4FUZhC-_rstdoaA4BOaA@mail.gmail.com>

On 04/19/2013 04:14 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> The dereference to 'ifp' in debug code should be moved below the NULL test.

Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>   drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> index 1bcd58c..69d5ad2 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
> @@ -821,11 +821,12 @@ brcmf_fws_flow_control_check(struct brcmf_fws_info *fws, struct pktq *pq,
>   {
>   	struct brcmf_if *ifp = fws->drvr->iflist[if_id];
>
> -	brcmf_dbg(TRACE,
> -		  "enter: bssidx=%d, ifidx=%d\n", ifp->bssidx, ifp->ifidx);
>   	if (WARN_ON(!ifp))
>   		return;
>
> +	brcmf_dbg(TRACE,
> +		  "enter: bssidx=%d, ifidx=%d\n", ifp->bssidx, ifp->ifidx);
> +
>   	if ((ifp->netif_stop & BRCMF_NETIF_STOP_REASON_FWS_FC) &&
>   	    pq->len <= BRCMF_FWS_FLOWCONTROL_LOWATER)
>   		brcmf_txflowblock_if(ifp,
>
>



      reply	other threads:[~2013-04-19  8:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  2:14 [PATCH -next] brcmfmac: fix potential NULL pointer dereference in brcmf_fws_flow_control_check() Wei Yongjun
2013-04-19  8:12 ` Arend van Spriel [this message]

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=5170FC8A.5020306@broadcom.com \
    --to=arend@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=frankyl@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=meuleman@broadcom.com \
    --cc=phaber@broadcom.com \
    --cc=pieterpg@broadcom.com \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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.