[RFC] change in /proc/devices

Alan Cox alan en lxorguk.ukuu.org.uk
Mar Ene 25 05:27:35 CST 2000


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