patch driver-core-fix-bug-in-class-device-code.patch added to gregkh-2.6 tree

<[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
This is a note to let you know that I've just added the patch titled

     Subject: Driver core: fix bug in class-device code

to my gregkh-2.6 tree.  Its filename is

     driver-core-fix-bug-in-class-device-code.patch

This tree can be found at 
    http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From [email protected] Thu Apr  5 13:02:20 2007
From: Alan Stern <[email protected]>
Date: Thu, 5 Apr 2007 16:02:17 -0400 (EDT)
Subject: Driver core: fix bug in class-device code
To: Greg KH <[email protected]>
Cc: USB development list <[email protected]>
Message-ID: <[email protected]>


This patch (as878) fixes a straightforward use-after-free bug in the
class-device core.  Just because the object in question is deprecated
is no excuse for causing an oops.

Signed-off-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

--- usb-2.6.orig/drivers/base/class.c
+++ usb-2.6/drivers/base/class.c
@@ -199,6 +199,11 @@ void class_unregister(struct class * cls
 {
 	pr_debug("device class '%s': unregistering\n", cls->name);
 
+#ifdef CONFIG_SYSFS_DEPRECATED_FUTURE
+	kobject_del(&cls->class_dir_depr);
+	kobject_put(&cls->class_dir_depr);
+#endif
+
 	if (cls->bus)
 		put_bus(cls->bus);
 	else {
@@ -206,11 +211,6 @@ void class_unregister(struct class * cls
 		kset_unregister(&cls->devices_dir);
 		subsystem_unregister(&cls->subsys);
 	}
-
-#ifdef CONFIG_SYSFS_DEPRECATED_FUTURE
-	kobject_del(&cls->class_dir_depr);
-	kobject_put(&cls->class_dir_depr);
-#endif
 }
 
 static void class_create_release(struct class *cls)


Patches currently in gregkh-2.6 which might be from [email protected] are


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.