[lkml]   [2001]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: rmmod whilst reading/writing sysctl

On Wed, 31 Oct 2001, John Levon wrote:

> Where is the prevention of module unload whilst a sysctl from a module is being read/written ?
> sysctl syscall is protected by BKL, but I can't see similar code for the cat >/proc/sys/...

... and that protection is worth nothing, since we copy data to/from
userland. Forget about BKL - it doesn't prevent races.

There is a shitload of rmmod (and plain "we remove the object" - it doesn't
have to be a module) races in that area. Composite trees _suck_. sysctls,
devfs, ddfs - whatever. If tree is served by several drivers - it's broken.

In case of sysctls I have an old patch that could be turned into something
working, but that will take a lot of changes in code that exports sysctls,
so that may be very painful.

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: 2005-03-22 13:12    [W:0.039 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site