lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOviyagW+P9sWMyG9gWo3GDBh=NxBP4kOQCYAja_UR2+7is6GQ@mail.gmail.com>
Date:	Sun, 6 Sep 2015 00:13:52 +1000
From:	Aleksa Sarai <cyphar@...har.com>
To:	rusty@...tcorp.com.au
Cc:	linux-kernel@...r.kernel.org
Subject: module_put_and_exit() and free_module()

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ