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-prev] [day] [month] [year] [list]
Message-ID: <20150911101934.GP9650@linux>
Date:	Fri, 11 Sep 2015 15:49:34 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	Arnd Bergmann <arnd@...db.de>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Pi-Cheng Chen <pi-cheng.chen@...aro.org>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: cpufreq: mediatek: allow modular build

On 11-09-15, 11:13, Russell King - ARM Linux wrote:
> Yes, but it's not that simple.
> 
> A module with no module_init() and no module_exit() is what's called a
> library module, which can be inserted, and later removed provided no
> other module depends on anything the library module exports.
> 
> A module with a module_init() but no module_exit() is one which can be
> inserted, but never removed.
> 
> A module with a module_init() and a module_exit() can be inserted, and
> later removed in much the same way as the library module mentioned above.
> 
> See kernel/module.c:
> 
>         /* If it has an init func, it must have an exit func to unload */
>         if (mod->init && !mod->exit) {
>                 forced = try_force_unload(flags);
>                 if (!forced) {
>                         /* This module can't be removed */
>                         ret = -EBUSY;
>                         goto out;
>                 }
>         }
> 
> and
> 
>         if (mod->init != NULL && mod->exit == NULL) {
>                 printed_something = 1;
>                 seq_puts(m, "[permanent],");
>         }

Thanks for that, really appreciate it.

And now I realize that Arnd was correct to start with :)

-- 
viresh
--
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