Re: Hundreds of bugs in 2.3.99-pre3

From: Mitchell Blank Jr (mitch@sfgoth.com)
Date: Fri Mar 31 2000 - 19:17:06 EST


Manfred Spraul wrote:
> What if foo_exit() was already running when foo_open() was called?
> AFAICS foo_exit() must either unlink the driver from all lists
> (unregister_{filesystem,blkdev,chrdev}, netdev_unregister, ...) before

The places that look up entries in these "register"ed lists do so with
the big-kernel-lock, which also protects against module_{init,exit}.
I think the socket-type lookup didn't follow this at one point... not
sure if that got fixed.

The only problem is if module_init does something that sleeps (for instance
allocs non-atomic memory) before incrementing the module count, since the
sleep will give up the big-lock, and another thread can then rmmod
the driver (since it has a zero module count).

-Mitch

-
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 : Fri Mar 31 2000 - 21:00:30 EST