[RFC] change in /proc/devices
Keith Owens
kaos en ocs.com.au
Mar Ene 25 03:52:54 CST 2000
On Mon, 24 Jan 2000 10:32:41 -0500 (EST),
Alexander Viro <viro en math.psu.edu> wrote:
>Umm... Not really. There is a bunch of nastier races around the whole
>thing (and insmod sucks too - figuring out results of the following
> open /dev/foo
> request_module
> module_init
> register_blkdev
> pointer to methods table set
> initializing disk/controller
> open /dev/foo
> found the pointer
> success
> read from the thing
> woops!
> finish initialization... too late ;-<
>is not too hard). So that stuff _really_ needs fixing - the races are
>pretty real and lead to Bad Things(tm).
But sys_open does lock_kernel(), filp_open(), unlock_kernel().
file_open drives module_init etc. All the module initialization should
be running under the big kernel lock, the second open should suspend
until the first one completes. If we are seeing races then something
is dropping the kernel lock at the wrong place or not reaquiring it
correctly.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda