lkml.org 
[lkml]   [2015]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectmodule_put_and_exit() and free_module()
From
From my understanding, module_put_and_exit() can be used inside a
module to (from within the module) kill itself. However, it doesn't
seem to properly free the modules references (and internal
bookkeeping) since module_put_and_exit() doesn't call free_module().
And attempting to remove the module after loading it and it running
module_put_and_exit() causes any attempt to remove the module to fail
with EBUSY.

Am I missing something here? Is the purpose of module_put_and_exit()
different, or does module_put() cause the module references to get
reaped later? If that's the case, why do you get EBUSY when trying to
remove the module (surely you should get an ENOENT)? Is it even safe
to attempt to remove a module from within itself?

Thanks in advance.

--
Aleksa Sarai (cyphar)
www.cyphar.com


\
 
 \ /
  Last update: 2015-09-05 16:41    [W:0.038 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site