login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
7
Re: [CORRECTION][PATCH] Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip/uli526x.c
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Jeff Garzik <jgarzik@...>
To: Micah Gruber <micah.gruber@...>
Cc: <linux-kernel@...>, <netdev@...>
Subject:
Re: [CORRECTION][PATCH] Fix a potential NULL pointer dereference in uli526x_interrupt() in drivers/net/tulip/uli526x.c
Date: Friday, September 7, 2007 - 7:20 pm
Micah Gruber wrote:
quoted text
> This patch fixes a potential null dereference bug where we dereference dev before a null check. This patch simply moves the dereferencing after the null check. > > Signed-off-by: Micah Gruber <micah.gruber@gmail.com> > --- > > --- a/drivers/net/tulip/uli526x.c > +++ b/drivers/net/tulip/uli526x.c > @@ -663,7 +663,7 @@ > { > struct net_device *dev = dev_id; > struct uli526x_board_info *db = netdev_priv(dev); > - unsigned long ioaddr = dev->base_addr; > + unsigned long ioaddr; > unsigned long flags; > > if (!dev) { > @@ -671,6 +671,8 @@ > return IRQ_NONE; > } > > + ioaddr = dev->base_addr; > +
as satyam noted, just remove the !dev test -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[CORRECTION][PATCH] Fix a potential NULL pointer dereference...
, Micah Gruber
, (Tue Sep 4, 4:14 am)
Re: [CORRECTION][PATCH] Fix a potential NULL pointer derefer...
, Andrew Morton
, (Thu Sep 13, 5:03 am)
Re: [CORRECTION][PATCH] Fix a potential NULL pointer derefer...
, Jeff Garzik
, (Thu Sep 13, 10:16 am)
Re: [CORRECTION][PATCH] Fix a potential NULL pointer derefer...
, Kyle McMartin
, (Thu Sep 13, 5:03 am)
Re: [CORRECTION][PATCH] Fix a potential NULL pointer derefer...
, Jeff Garzik
, (Fri Sep 7, 7:20 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Tarkan Erimer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Amit K. Arora
[RFC] Heads up on sys_fallocate()
Bart Van Assche
Integration of SCST in the mainstream Linux kernel
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Frans Pop
svc: failed to register lockdv1 RPC service (errno 97).
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
3 users
and
693 guests
online.
Online users
cbelgr87
spanish
elinga30
Syndicate