On 6/27/06, Linus Torvalds <[email protected]> wrote:
Greg? Dmitry?
To trigger, you probably need both slab debugging _and_ spinlock debugging
on. And perhaps just the right timings, although I've been able to do it
three times in a row now, so it doesn't seem to be _that_ timing
sensitive.
Yep, this was me. I need to activate more debug options by default...
I believe this patch will fix it. Sorry, I had to send it as an attachment.
--
Dmitry
Input: fix resetting name, phys and uniq when unregistering device
It should be done before calling class_device_unregister() because
it will destroy the device and free memory if there are no other
references to the device.
Signed-off-by: Dmitry Torokhov <[email protected]>
---
drivers/input/input.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux/drivers/input/input.c
===================================================================
--- linux.orig/drivers/input/input.c
+++ linux/drivers/input/input.c
@@ -1033,12 +1033,13 @@ void input_unregister_device(struct inpu
sysfs_remove_group(&dev->cdev.kobj, &input_dev_caps_attr_group);
sysfs_remove_group(&dev->cdev.kobj, &input_dev_id_attr_group);
sysfs_remove_group(&dev->cdev.kobj, &input_dev_attr_group);
- class_device_unregister(&dev->cdev);
mutex_lock(&dev->mutex);
dev->name = dev->phys = dev->uniq = NULL;
mutex_unlock(&dev->mutex);
+ class_device_unregister(&dev->cdev);
+
input_wakeup_procfs_readers();
}
EXPORT_SYMBOL(input_unregister_device);
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]