netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 06/13] Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip/uli526x.c
@ 2007-10-02 21:11 akpm
  2007-10-02 21:20 ` Grant Grundler
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-10-02 21:11 UTC (permalink / raw)
  To: jeff; +Cc: netdev, akpm, micah.gruber, grundler, kyle

From: Micah Gruber <micah.gruber@gmail.com>

This patch fixes an apparent potential null dereference bug where we
dereference dev before a null check.  This patch simply remvoes the
can't-happen test for a null pointer.

Signed-off-by: Micah Gruber <micah.gruber@gmail.com>
Cc: Grant Grundler <grundler@parisc-linux.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/tulip/uli526x.c |    5 -----
 1 file changed, 5 deletions(-)

diff -puN drivers/net/tulip/uli526x.c~fix-a-potential-null-pointer-dereference-in-uli526x_interrupt drivers/net/tulip/uli526x.c
--- a/drivers/net/tulip/uli526x.c~fix-a-potential-null-pointer-dereference-in-uli526x_interrupt
+++ a/drivers/net/tulip/uli526x.c
@@ -664,11 +664,6 @@ static irqreturn_t uli526x_interrupt(int
 	unsigned long ioaddr = dev->base_addr;
 	unsigned long flags;
 
-	if (!dev) {
-		ULI526X_DBUG(1, "uli526x_interrupt() without DEVICE arg", 0);
-		return IRQ_NONE;
-	}
-
 	spin_lock_irqsave(&db->lock, flags);
 	outl(0, ioaddr + DCR7);
 
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 06/13] Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip/uli526x.c
  2007-10-02 21:11 [patch 06/13] Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip/uli526x.c akpm
@ 2007-10-02 21:20 ` Grant Grundler
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Grundler @ 2007-10-02 21:20 UTC (permalink / raw)
  To: akpm; +Cc: jeff, netdev, micah.gruber, grundler, kyle

On Tue, Oct 02, 2007 at 02:11:38PM -0700, akpm@linux-foundation.org wrote:
> From: Micah Gruber <micah.gruber@gmail.com>
> 
> This patch fixes an apparent potential null dereference bug where we
> dereference dev before a null check.  This patch simply remvoes the
> can't-happen test for a null pointer.
> 
> Signed-off-by: Micah Gruber <micah.gruber@gmail.com>
> Cc: Grant Grundler <grundler@parisc-linux.org>

Acked-by: Grant Grundler <grundler@parisc-linux.org>

thanks!
grant

> Acked-by: Jeff Garzik <jeff@garzik.org>
> Acked-by: Kyle McMartin <kyle@mcmartin.ca>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/net/tulip/uli526x.c |    5 -----
>  1 file changed, 5 deletions(-)
> 
> diff -puN drivers/net/tulip/uli526x.c~fix-a-potential-null-pointer-dereference-in-uli526x_interrupt drivers/net/tulip/uli526x.c
> --- a/drivers/net/tulip/uli526x.c~fix-a-potential-null-pointer-dereference-in-uli526x_interrupt
> +++ a/drivers/net/tulip/uli526x.c
> @@ -664,11 +664,6 @@ static irqreturn_t uli526x_interrupt(int
>  	unsigned long ioaddr = dev->base_addr;
>  	unsigned long flags;
>  
> -	if (!dev) {
> -		ULI526X_DBUG(1, "uli526x_interrupt() without DEVICE arg", 0);
> -		return IRQ_NONE;
> -	}
> -
>  	spin_lock_irqsave(&db->lock, flags);
>  	outl(0, ioaddr + DCR7);
>  
> _

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-02 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-02 21:11 [patch 06/13] Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip/uli526x.c akpm
2007-10-02 21:20 ` Grant Grundler

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).