Messages in this thread | | | Date | Sat, 04 Feb 2006 15:04:45 +0300 | From | "Artem B. Bityutskiy" <> | Subject | Re: [QUESTION/sysfs] strange refcounting |
| |
Artem B. Bityutskiy wrote: > Then, I see /sys/devices/mydev/ in sysfs. I open > pre-defined /sys/devices/mydev/power/state in userspace and don't close it. > > Then I run lsmod, and see zero refcount to my module. Well, I run rmmod > mymod, module is unloaded. > > Then I close /sys/devices/mydev/power/state, and enjoy segfault. > I actually forgot to formulate my question: why module's refcount is not increased when somebody opens a sysfs file which belongs to this module? How to withstan to an unexpected module unload?
Thanks.
-- Best Regards, Artem B. Bityutskiy, St.-Petersburg, Russia. - 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/
| |