* [PATCH] [2.6.22] Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c
@ 2007-07-24 2:44 Micah Gruber
2007-07-24 20:24 ` Jeff Garzik
2007-07-30 19:59 ` Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Micah Gruber @ 2007-07-24 2:44 UTC (permalink / raw)
To: linux-kernel, netdev, jgarzik
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/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -996,7 +996,7 @@
{
struct net_device *dev = (struct net_device *) dev_id;
mace_private *lp = netdev_priv(dev);
- kio_addr_t ioaddr = dev->base_addr;
+ kio_addr_t ioaddr;
int status;
int IntrCnt = MACE_MAX_IR_ITERATIONS;
@@ -1006,6 +1006,8 @@
return IRQ_NONE;
}
+ ioaddr = dev->base_addr;
+
if (lp->tx_irq_disabled) {
printk(
(lp->tx_irq_disabled?
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c 2007-07-24 2:44 [PATCH] [2.6.22] Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c Micah Gruber @ 2007-07-24 20:24 ` Jeff Garzik 2007-07-30 19:59 ` Jeff Garzik 1 sibling, 0 replies; 3+ messages in thread From: Jeff Garzik @ 2007-07-24 20:24 UTC (permalink / raw) To: Micah Gruber; +Cc: linux-kernel, netdev Micah Gruber wrote: > 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/pcmcia/nmclan_cs.c +++ > b/drivers/net/pcmcia/nmclan_cs.c @@ -996,7 +996,7 @@ PLEASE PLEASE PLEASE fix your mailer. None of your patches are apply-able via script or patch(1), which is how all Linux maintainers apply patches. If you want to contribute to the kernel, you -must- figure out how to send patches via email. Linux kernel development is done almost exclusively through email, so it is very important to get the details right. Jeff ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [2.6.22] Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c 2007-07-24 2:44 [PATCH] [2.6.22] Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c Micah Gruber 2007-07-24 20:24 ` Jeff Garzik @ 2007-07-30 19:59 ` Jeff Garzik 1 sibling, 0 replies; 3+ messages in thread From: Jeff Garzik @ 2007-07-30 19:59 UTC (permalink / raw) To: Micah Gruber; +Cc: linux-kernel, netdev Micah Gruber wrote: > 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> applied (git-am worked!) ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-30 19:59 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-07-24 2:44 [PATCH] [2.6.22] Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c Micah Gruber 2007-07-24 20:24 ` Jeff Garzik 2007-07-30 19:59 ` Jeff Garzik
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).