lkml.org 
[lkml]   [2003]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How can a loadable kernel module remove itself?
On Tue, 2003-11-18 10:45:57 -0500, Alan Stern <stern@rowland.harvard.edu>
wrote in message <Pine.LNX.4.44L0.0311181036590.783-100000@ida.rowland.org>:
> Say I've got a kernel module that decides its job is done, and it wants to
> unload itself automatically. Is there any way to do that? Basically I'm
> looking for the opposite of the request_module() function, except that
> I've already got a pointer to the module in question, i.e., THIS_MODULE.

If the module's runtime is *really* limited (eg. I oftenly use very
small modules to printk() me some bytes from some in-kernel data
structures), then just do what you need to do in the function
"registered" with module_init() and return with != 0...

MfG, JBG

--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.113 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site