All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Rose <gvrose8192@gmail.com>
To: Myungho Jung <mhjungk@gmail.com>
Cc: edumazet@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH] p54: Prevent from dereferencing null pointer when releasing SKB
Date: Thu, 20 Apr 2017 16:03:43 -0700	[thread overview]
Message-ID: <1492729423.17866.6.camel@gmail.com> (raw)
In-Reply-To: <1492712723-9350-1-git-send-email-mhjungk@gmail.com>

On Thu, 2017-04-20 at 11:25 -0700, Myungho Jung wrote:
> Added NULL check to make __dev_kfree_skb_irq consistent with kfree
> family of functions.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=195289
> 
> Signed-off-by: Myungho Jung <mhjungk@gmail.com>

Hi,

I think the patch is fine but I'm confused by the subject.  You mention
p54 driver but the change is in dev.c.  I know the bugzilla references
the p54 but that's not where the change is.

Seems odd to me.

- Greg

> ---
>  net/core/dev.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 7869ae3..22be2a6 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -2450,6 +2450,9 @@ void __dev_kfree_skb_irq(struct sk_buff *skb, enum skb_free_reason reason)
>  {
>  	unsigned long flags;
>  
> +	if (unlikely(!skb))
> +		return;
> +
>  	if (likely(atomic_read(&skb->users) == 1)) {
>  		smp_rmb();
>  		atomic_set(&skb->users, 0);

  reply	other threads:[~2017-04-20 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-20 18:25 [PATCH] p54: Prevent from dereferencing null pointer when releasing SKB Myungho Jung
2017-04-20 23:03 ` Greg Rose [this message]
2017-04-20 23:23   ` Myungho Jung
2017-04-20 23:25     ` Greg Rose
  -- strict thread matches above, loose matches on Subject: below --
2017-04-10 22:39 Myungho Jung

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=1492729423.17866.6.camel@gmail.com \
    --to=gvrose8192@gmail.com \
    --cc=edumazet@google.com \
    --cc=mhjungk@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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.