Re: More platform driver questions

From: Dmitry Torokhov
Date: Tue Dec 13 2005 - 02:22:26 EST


Hi Jean,

On Tuesday 13 December 2005 02:17, Jean Delvare wrote:
> Now the question is, is there actually any race condition there? In my
> case, the only users of the driver data are the sysfs callback
> functions, so I guess that this is all down to whether the driver core
> will unregister them before platform_driver.remove is called, or after
> it is called. If .remove is called first, then yes my code is racy and
> I'll have to fix it.

Remove might be called first if sysfs attributes were open at the time
platform_device_unregister was issued. The only thing that is guaranteed
that ->release() is called only when last reference to kobject was dropped.

--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/