All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jinqiu <crindy646@gmail.com>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] Fix bug #13853: dereference pointer 'dev' before null check
Date: Thu, 03 Mar 2011 16:19:20 -0500	[thread overview]
Message-ID: <4D7005D8.7000407@gmail.com> (raw)
In-Reply-To: <20110303112920.307665dc.rdunlap@xenotime.net>


On 11-3-3 下午2:29, Randy Dunlap wrote:
> 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)
>> {
>> 	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;
> Did you patch generator tool insert tabs in this patch?
No, I did not. This is weird. The original patch is fine.
  I would fix email client issues.
Thanks for your help! :-)

  Jinqiu
> The line below should be formatted as:
>
> @@ -429,6 +429,7 @@ static irqreturn_t ariadne_interrupt(int
>
> with no space between 429, and 7.
>
>> @@ -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 ***


      reply	other threads:[~2011-03-03 21:19 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
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 [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=4D7005D8.7000407@gmail.com \
    --to=crindy646@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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.