On Tue, Apr 25, 2006 at 08:53:16PM +0400, Artem B. Bityutskiy wrote:
> Hello,
>
> last time I tried to use "bare" sysfs functions to create my sysfs
> hierarchy I ended up with a problem that the module refcount is not
> increased when those sysfs files are opened. So I could open a sysfs
> file from userspace, do rmmod and enjoy oops.
>
> Then I started using the class and class_device stuff, which have an
> .owner field, and all became fine.
>
> I'm not sure if this is a problem of sysfs, but I suspect it could take
> care of module refcount better.
>
> In your patch, I looked for THIS_MODULE pattern and did not find. I did
> not try, but I suspect your code is not devoid of the problem I
> described. So, this is just FYI and may be not the case.
Others have also alluded to /sys/fs/ races that we'll probably need to
resolve. In this case the question is more about umount than rmmod since
the mount should reference the module.
Thanks,
Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]