Re: [patch] Yenta module race condition

From: Linus Torvalds (torvalds@transmeta.com)
Date: Fri May 05 2000 - 14:29:44 EST


On Fri, 5 May 2000, Andreas Dilger wrote:
>
> I wrote some code for a module that started a kernel thread. You can't
> use module reference counts for the threads because rmmod does not let
> you remove a module with a non-zero reference count. Hence, it is not
> possible to have the module unload code kill the thread and the thread
> do the DEC_MOD_USE_COUNT, as you never even get into the cleanup code
> because of the non-zero reference count.

But that is _fine_.

You don't ant to auto-unload the yenta module anyway as far as I can tell:
that would be bad when the laptop suddenly without any user action stops
caring about card insert/eject events.

So you _want_ to have the module locked down, until the user explicitly
decides to get rid of it, at which point the user (maybe an automated
shutdown script) can explicitly kill the cardbus watcher deamons and
unload the module.

                Linus

-
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 : Sun May 07 2000 - 21:00:18 EST