Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24.4 /net/core/dev.c

Filename:/net/core/dev.c
Lines Added:3
Lines Deleted:3
Also changed in: (Previous) 2.6.24.4-rc3  2.6.24.4-rc2  2.6.24.4-rc1  2.6.24-git22  2.6.24-git21  2.6.24-git20 
(Following) 2.6.24.5-rc1  2.6.24.5-rc2  2.6.24.5  2.6.24.6  2.6.24.7  2.6.25-rc7 

Location
[  2.6.24.4
  [  net
    [  core
       o  dev.c

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index 0879f52..4d44372 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1068,8 +1068,6 @@ int dev_close(struct net_device *dev)
     */
    call_netdevice_notifiers(NETDEV_GOING_DOWN, dev);
 
-   dev_deactivate(dev);
-
    clear_bit(__LINK_STATE_START, &dev->state);
 
    /* Synchronize to scheduled poll. We cannot touch poll list,
@@ -1080,6 +1078,8 @@ int dev_close(struct net_device *dev)
     */
    smp_mb__after_clear_bit(); /* Commit netif_running(). */
 
+   dev_deactivate(dev);
+
    /*
     *   Call the device specific close. This cannot fail.
     *   Only if device is UP
@@ -2906,7 +2906,7 @@ int __dev_addr_add(struct dev_addr_list **list, int *count,
       }
    }
 
-   da = kmalloc(sizeof(*da), GFP_ATOMIC);
+   da = kzalloc(sizeof(*da), GFP_ATOMIC);
    if (da == NULL)
       return -ENOMEM;
    memcpy(da->da_addr, addr, alen);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.