Re: [OKS] Module removal

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Sun Jul 07 2002 - 19:31:42 EST


Oliver Neukum wrote:
> How do you find CPU's that are about to execute module code ?
>
> IMHO you need to do this freeze trick before you check the module
> usage count.
>
> [..]
> > Another possibility would be the RCU thing: execute the module's exit
> > function, but keep the module's memory allocated until some safe
> > scheduling point later, when you are sure that no CPU can possibly be
> > running the module.
>
> But what do you do if that CPU increases the module usage count?

Those are the cases where I said this does not help.
You basically need:

      (a) to catch the exiting case properly
      (b) to catch entry points

Catching the entry points is what the current `try_inc_mod_count' code
does. I can't think of another way to do that.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jul 07 2002 - 22:00:18 EST