Re: [RFC] change in /proc/devices

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Mon Jan 24 2000 - 21:19:21 EST


> 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

lock_kernel is a lock only for _non_blocking_ code cases.

> 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.

It is being dropped when drivers block - eg partition scanning perhaps or
a kmalloc of GFP_KERNEL.

I think perhaps we need a module_lock that forbids just module load/unload
when its held. A reader/writer lock with the unload as the writer and
the rest as readers ?

Alan

-
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/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:13 EST