]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix net sysfs patch for 2.6.20, 2.6.20.14-rc2
authorChris Wright <chrisw@sous-sol.org>
Fri, 8 Jun 2007 21:36:04 +0000 (14:36 -0700)
committerChris Wright <chrisw@sous-sol.org>
Fri, 8 Jun 2007 21:36:04 +0000 (14:36 -0700)
review-2.6.20/net-fix-race-condition-about-network-device-name-allocation.patch

index 9f8aebceedaf51df8eb5d1aa493928117f60b1ec..bd8ad4191d33cf18164e3dd4471b11e87ae7f217 100644 (file)
@@ -49,7 +49,7 @@ Signed-off-by: Chris Wright <chrisw@sous-sol.org>
                        dev->destructor(dev);
 +
 +              /* Free network device */
-+              kobject_put(&dev->dev.kobj);
++              kobject_put(&dev->class_dev.kobj);
        }
  
  out:
@@ -75,10 +75,10 @@ Signed-off-by: Chris Wright <chrisw@sous-sol.org>
  void netdev_unregister_sysfs(struct net_device * net)
  {
 -      class_device_del(&(net->class_dev));
-+      struct device *dev = &(net->dev);
++      struct class_device *dev = &(net->class_dev);
 +
 +      kobject_get(&dev->kobj);
-+      device_del(dev);
++      class_device_del(dev);
  }
  
  /* Create sysfs entries for network device. */