From: Randy Dunlap <rdunlap@xenotime.net>
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, 3 Mar 2011 11:23:47 -0800 [thread overview]
Message-ID: <20110303112347.12059596.rdunlap@xenotime.net> (raw)
In-Reply-To: <4D6EFAE5.4000400@gmail.com>
On Wed, 02 Mar 2011 21:20:21 -0500 Jinqiu wrote:
> This patch fixes bug #13853 .This still exists in latest version.
> '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)
> {
It looks like thunderbird has split a long line into multiple lines for you.
This is bad. See if Documentation/email-clients.txt can help you out any.
> struct net_device *dev = (struct net_device *) data;
> - volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
> + volatile struct Am79C960 *lance;
> 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 */
>
>
>
>
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2011-03-03 19:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 2:20 Jinqiu
2011-03-03 2:50 ` Li Zefan
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 [this message]
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=20110303112347.12059596.rdunlap@xenotime.net \
--to=rdunlap@xenotime.net \
--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
all inboxes | Powered by JetHome®