Re: [PATCH 01/12] module: Move modprobe_path and modules_disabled ctl_tables into the module subsys

From
Luis Chamberlain <mcgrof@kernel.org>
Date
2025-05-09 16:09:46
Also in
linux-fsdevel, linux-mm, linux-serial, lkml, rcu
Reply to
Joel Granados, 2025-05-09
On Fri, May 09, 2025 at 02:54:05PM +0200, Joel Granados wrote:
quoted hunk ↗ jump to hunk
diff --git a/kernel/module/kmod.c b/kernel/module/kmod.c
index 25f25381251281a390b273cd8a734c92b960113a..5701629adc27b4bb5080db75f0e69f9f55e9d2ad 100644
--- a/kernel/module/kmod.c
+++ b/kernel/module/kmod.c
@@ -60,7 +60,7 @@ static DEFINE_SEMAPHORE(kmod_concurrent_max, MAX_KMOD_CONCURRENT);
 /*
 	modprobe_path is set via /proc/sys.
 */
-char modprobe_path[KMOD_PATH_LEN] = CONFIG_MODPROBE_PATH;
+static char modprobe_path[KMOD_PATH_LEN] = CONFIG_MODPROBE_PATH;
 
 static void free_modprobe_argv(struct subprocess_info *info)
 {
@@ -177,3 +177,33 @@ int __request_module(bool wait, const char *fmt, ...)
 	return ret;
 }
 EXPORT_SYMBOL(__request_module);
+
+#ifdef CONFIG_MODULES
kernel/Makefile:

obj-$(CONFIG_MODULES) += module/

And so you can drop this ifdef.

Other than that:

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis
Thread (43 messages) 43 messages, 7 authors, last reply 2025-05-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help