lkml.org 
[lkml]   [2006]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [GIT PATCH] USB patches for 2.6.17
Greg KH <gregkh@suse.de> wrote:
>
> I would think it's something new too, as I did change that very line
> that oopsed. That's why I found it odd that I couldn't reproduce it
> anymore.

device_destroy() looks wrong. It alters the class->devices list outside
its lock.

--- 25/drivers/base/core.c~device_destroy-locking-fix Thu Jun 22 17:29:07 2006
+++ 25-akpm/drivers/base/core.c Thu Jun 22 17:29:34 2006
@@ -632,14 +632,13 @@ void device_destroy(struct class *class,
list_for_each_entry(dev_tmp, &class->devices, node) {
if (dev_tmp->devt == devt) {
dev = dev_tmp;
+ list_del_init(&dev->node);
break;
}
}
up(&class->sem);

- if (dev) {
- list_del_init(&dev->node);
+ if (dev)
device_unregister(dev);
- }
}
EXPORT_SYMBOL_GPL(device_destroy);
That won't be it though.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-23 02:31    [W:0.166 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site