public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Brett Rudley <brudley@broadcom.com>,
	Roland Vossen <rvossen@broadcom.com>,
	"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
	Kan Yan <kanyan@broadcom.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Pieter-Paul Giesberts <pieterpg@broadcom.com>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] brcm80211: brcmu_pkt_buf_free_skb() should handle NULL
Date: Tue, 15 May 2012 14:21:24 +0000	[thread overview]
Message-ID: <4FB26664.2080008@broadcom.com> (raw)
In-Reply-To: <20120515090027.GG30265@elgon.mountain>

On 05/15/2012 11:00 AM, Dan Carpenter wrote:
> This is potentially called with NULL pointers, for example, look at
> brcmf_c_prec_enq().  Since it's a free() function, probably people
> expect it to handle NULL pointers.

Acked-by: Arend van Spriel <arend@broadcom.com>

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c
> index b45ab34..3e6405e 100644

Is the diff command filtered properly here. In most patches I usually
see '---' immediatly after the Signed-off-by line.

> --- a/drivers/net/wireless/brcm80211/brcmutil/utils.c
> +++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c
> @@ -43,6 +43,8 @@ EXPORT_SYMBOL(brcmu_pkt_buf_get_skb);
>  /* Free the driver packet. Free the tag if present */
>  void brcmu_pkt_buf_free_skb(struct sk_buff *skb)
>  {
> +	if (!skb)
> +		return;
>  	WARN_ON(skb->next);
>  	if (skb->destructor)
>  		/* cannot kfree_skb() on hard IRQ (net/core/skbuff.c) if
> 

Gr. AvS


  reply	other threads:[~2012-05-15 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15  9:00 [patch] brcm80211: brcmu_pkt_buf_free_skb() should handle NULL Dan Carpenter
2012-05-15 14:21 ` Arend van Spriel [this message]
2012-05-15 14:28   ` Arend van Spriel
2012-05-15 14:44   ` Dan Carpenter
2012-05-15 15:07     ` Julia Lawall
2012-05-15 16:57       ` 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=4FB26664.2080008@broadcom.com \
    --to=arend@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=dan.carpenter@oracle.com \
    --cc=frankyl@broadcom.com \
    --cc=gregkh@suse.de \
    --cc=kanyan@broadcom.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=pieterpg@broadcom.com \
    --cc=rvossen@broadcom.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