Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c196d80f994ef4ffefd5a7c62e3f42bd75d538bc
Commit:     c196d80f994ef4ffefd5a7c62e3f42bd75d538bc
Parent:     85e27831941e0d907be8e244202a293d74730e12
Author:     Micah Gruber <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 24 10:44:56 2007 +0800
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Jul 30 15:58:54 2007 -0400

    Fix a potential NULL pointer dereference in mace_interrupt() in 
drivers/net/pcmcia/nmclan_cs.c
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/pcmcia/nmclan_cs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index 73da611..997c2d0 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -996,7 +996,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
 {
   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 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
     return IRQ_NONE;
   }
 
+  ioaddr = dev->base_addr;
+
   if (lp->tx_irq_disabled) {
     printk(
       (lp->tx_irq_disabled?
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to