public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: Jinqiu <crindy646@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] Fix bug #13853: dereference pointer 'dev' before null check
Date: Thu, 03 Mar 2011 10:50:02 +0800	[thread overview]
Message-ID: <4D6F01DA.3040307@cn.fujitsu.com> (raw)
In-Reply-To: <4D6EFAE5.4000400@gmail.com>

So you've been told to read Documentation/SubmittingPatches
and Documentation/email-clients.txt, but there are still quite
a few problems in your patch..

Don't ever mention "bug #13853", because this number makes no sense
for everyone except you. A proper subject may be:

[PATCH] ariadne: fix possible null dereference.

And please send your patches to proper maintainers and mailing list,
David Miller and netdev@vger.kernel.org in particular.

Jinqiu wrote:
> This patch fixes bug #13853 .This still exists in latest version.

Of course it exists, otherwise your patch won't be applied, so just
remove this line from your changelog.

> 'dev' is dereferenced before testing for NULL.
> 
> Signed-off-by: Jinqiu Yang<crindy646@gmail.com>
> --- a/drivers/net/ariadne.c
> +++ b/drivers/net/ariadne.c
> @@ -420,7 +420,7 @@ static inline void ariadne_reset(struct
> static irqreturn_t ariadne_interrupt(int irq, void *data)
> {
>     struct net_device *dev = (struct net_device *) data;
> -     volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
> +     volatile struct Am79C960 *lance;

You still haven't fix your email client. You should notice the tabs have
been turned into spaces.

Please make sure you fix this (and other issues) before sending out the
patch again.

>     struct ariadne_private *priv;
>     int csr0, boguscnt;
>     int handled = 0;
> @@ -429,6 +429, 7 @@ static irqreturn_t ariadne_interrupt(int
>         printk(KERN_WARNING  "ariadne_interrupt(): irq for unknown device.\n");
>         return IRQ_NONE;
>     }
> +     lance = (struct Am79C960 *)dev->base_addr;
> 
>     lance->RAP = CSR0;                     /* PCnet-ISA Controller Status */
> 
> 
> 
> 
> -- 

  reply	other threads:[~2011-03-03  2:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03  2:20 [patch] Fix bug #13853: dereference pointer 'dev' before null check Jinqiu
2011-03-03  2:50 ` Li Zefan [this message]
2011-03-03  8:11   ` Wolfram Sang
2011-03-03 16:41     ` Randy Dunlap
2011-03-04  2:03       ` Li Zefan
2011-03-03 16:42   ` Randy Dunlap
2011-03-03 19:23 ` Randy Dunlap
2011-03-03 19:29 ` Randy Dunlap
2011-03-03 21:19   ` Jinqiu

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=4D6F01DA.3040307@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=crindy646@gmail.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox