Re: Rusty's module talk at the Kernel Summit

Thunder from the hill
2002-07-11T17:59:06Z

Hi,

On Thu, 11 Jul 2002, Roman Zippel wrote:
> On Thu, 11 Jul 2002, Daniel Phillips wrote:
> > Closing the rmmod race with this interface is easy. We can for example just
> > keep a state variable in the module struct (protected by a lock) to say the
> > module is in the process of being deregistered.
>
> Please check try_inc_mod_count(). It's already done.

Btw, couldn't the module/non-module issue be solved like this:

int module_do_blah(struct blah *blah, didel_t dei)
#ifdef __MODULE__
{
locking_code();
pure_module_do_blah(blah, dei)
unlocking_code();
}

int pure_module_do_blah(struct blah *blah, didel_t dei)
#endif /* __MODULE__ */

Just an idea...

Regards,
Thunder
--
(Use http://www.ebb.org/ungeek if you can't decode)
------BEGIN GEEK CODE BLOCK------
Version: 3.12
GCS/E/G/S/AT d- s++:-- a? C++$ ULAVHI++++$ P++$ L++++(+++++)$ E W-$
N--- o? K? w-- O- M V$ PS+ PE- Y- PGP+ t+ 5+ X+ R- !tv b++ DI? !D G
e++++ h* r--- y-
------END GEEK CODE BLOCK------