It doesn't - note the absense of ->release() in the introduced objects,
lack of refcount in current ones and chunks like
+ class_device_unregister(&dev->class_dev);
+ kfree(dev);
in the patch. The last one is obvious breakage, no matter what else is
going on - if ->class_dev is registered, it could be held by opened
sysfs file and we are doing kfree() of a busy object. If it is not,
unregister will be unhappy _and_ we still might have it held by opened
sysfs file since the time when it used to be registered.
IOW, before something like that we'd need to make lifetime rules
for evdev et.al. refcounting-based, make drivers/input/* OK with
zombies ("I want it gone, but sysfs holds it") and when that is
done - have freeing done from ->release() of kobject.
Note that things like evdev->open are _not_ immediately usable for
refcounts - the lifetime is controlled by combination of ->exist
and ->open and we do non-trivial work when current ->open hits
zero, so just adding offset to ->open won't do.
-
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/