Revert "driver core: refcounting fix"
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 23:25:04 +0000 (15:25 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 23:25:04 +0000 (15:25 -0800)
This reverts commit 63ce18cfe685115ff8d341bae4c9204a79043cf0.

It was the incorrect fix and causes a reference counting bug whenever
any driver module is removed from the system. Mike Galbraith
<efault@gmx.de> is looking for the real fix for his problem.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/module.c

index f77e893e4620ce0db767b335058daf4744a6393b..fbc51de6444e4bbb9973a12a90698adf1db700b2 100644 (file)
@@ -2419,12 +2419,6 @@ void module_remove_driver(struct device_driver *drv)
                        kfree(driver_name);
                }
        }
-       /*
-        * Undo the additional reference we added in module_add_driver()
-        * via kset_find_obj()
-        */
-       if (drv->mod_name)
-               kobject_put(&drv->kobj);
 }
 EXPORT_SYMBOL(module_remove_driver);
 #endif