On Wed, Jun 29, 2005 at 06:59:00PM +0200, matthieu castet wrote:Ok, but if we unplug a device, then disconnect will be called even if we opened a sysfs file.
Hi,
I have a question about sysfs interface.
If you open a sysfs file created by a module, then remove it (rmmoding the module that create this sysfs file), then try to read the opened file, you often get strange result (segdefault or oppps).
What file did you do this for? The module count should be incremented
if you do this, to prevent the module from being unloaded.
Yes I know, but fewer possible opps won't hurt ;)If it is the first case, I fear that lot's of modules are broken.
Remember, only root can unload modules, so it really isn't _that_ big of
a deal (I can do a lot more damage as root than just oopsing the
kernel...)