netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Alexander Strakh <strakh@ispras.ru>
Cc: Donald Becker <becker@scyld.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: BUG null dereference in driver ./drivers/net/3c507.c
Date: Tue, 15 Dec 2009 15:14:34 +0100	[thread overview]
Message-ID: <200912151514.34693.bzolnier@gmail.com> (raw)
In-Reply-To: <200912151755.08345.strakh@ispras.ru>


Hi,

On Tuesday 15 December 2009 06:55:08 pm Alexander Strakh wrote:
> 	KERNEL_VERSION: 2.6.32
> 	SUBJECT: null dereference aftre check
> 	DESCRIBE:
> 	In driver drivers/net/3c507.c in function Iirqreturn_t el16_interrupt:
> 
> 1. If in line 555 dev = NULL then we goto line 556
> 2. In line 556 we have null dereference because pr_err called with dev->name 
> in third parameter.
> 
>  555        if (dev == NULL) {
>  556                pr_err("%s: net_interrupt(): irq %d for unknown device.
> \n",
>  557                        dev->name, irq);
>  558                return IRQ_NONE;
>  559        }

There is no NULL dereference bug there possible since 'dev' will never be
actually NULL in el16_interrupt() (because of the way IRQ kernel subsystem
and 3c507 network driver are designed/work).

IOW it is just a bogus NULL pointer check, though it still would be nice
to have the issue fixed.  Care to send a patch removing it?

--
Bartlomiej Zolnierkiewicz

      reply	other threads:[~2009-12-15 14:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15 17:55 BUG null dereference in driver ./drivers/net/3c507.c Alexander Strakh
2009-12-15 14:14 ` Bartlomiej Zolnierkiewicz [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=200912151514.34693.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=becker@scyld.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=strakh@ispras.ru \
    /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;
as well as URLs for NNTP newsgroup(s).