lkml.org 
[lkml]   [2006]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2006-02-04 13:07    [from the cache]
©2003-2011 Jasper Spaans