[lkml]   [2006]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    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?


    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
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-02-04 13:07    [W:0.020 / U:1.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site