lkml.org 
[lkml]   [2000]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] change in /proc/devices
Date
On Mon, 24 Jan 2000 10:32:41 -0500 (EST), 
Alexander Viro <viro@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@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.364 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site