[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 00061) Re: kernel-2.4.0-0.24usagi20001101a.586.rpm



In article <u8zpd8196.wl@xxxxxxxxxxxxxxxxxxxxx> (at Tue, 19 Dec 2000 13:48:37 +0900), Yuji Sekiya <sekiya@xxxxxxxxxxxxxx> says:

> > Are there any differences from the user point of view bewtween using
> > IPv6 as a module or in compiled?
> 
> I believe there is no diferrence. However we can load IPv6 as module,
> we can't unload it... We should try to improve it.

I don't think so.  net/ipv4/ip_gre.c does not have support for 
modulized ipv6.  It is not so easy to fix this problem because
that code should be referenced if and only if ipv6 module is loaded 
for modulized ipv6.

To fix this, I'd like to know any method to detect whether the module 
is loaded and lock at once:

 int module_detect_and_lock(modulename_t *module){
   module_t *module
   modulelist_readlock();
   if (module = module_isloaded(module))
     module_readlock(module)
   modulelist_readunlock();
 }

then, I could do this.

 if (module = module_detect_and_lock(IPV6_MODULE)){
   /* do ipv6 related things because ipv6 module is loaded. */
   ...
   module_readunlock(module);
 }

-- 
Hideaki YOSHIFUJI @ USAGI Project  <yoshfuji@xxxxxxxxxxxxxx>
PGP5i FP: F731 6599 5EB2 BBA7 1515  1323 1806 A96F 5700 6B25