All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libkmod: Always search modules.builtin if no alias has been found
@ 2021-05-04 23:58 Peter Kjellerstedt
  2021-05-09  5:55 ` Lucas De Marchi
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Kjellerstedt @ 2021-05-04 23:58 UTC (permalink / raw)
  To: linux-modules; +Cc: Peter Kjellerstedt

Commit 89443220e broke the lookup for builtin modules. modules.builtin
was no longer searched if kmod_lookup_alias_from_kernel_builtin_file()
returned 0.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

I do not know if this is the correct thing to do, or if the commit
message makes any sense. However, it solves the problem we were seeing.
We use fuse, which installs /etc/modules-load.d/fuse.conf to load the
fuse kernel module. However, we have fuse built-in. Normally, the
following can be seen in the log:

  systemd-modules-load[192]: Module 'fuse' is built in

but after commit 89443220e, we instead got:

  systemd-modules-load[193]: Failed to find module 'fuse'

//Peter

 libkmod/libkmod-module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
index 76a6dc3..6720930 100644
--- a/libkmod/libkmod-module.c
+++ b/libkmod/libkmod-module.c
@@ -577,7 +577,7 @@ KMOD_EXPORT int kmod_module_new_from_lookup(struct kmod_ctx *ctx,
 
 	DBG(ctx, "lookup modules.builtin.modinfo %s\n", alias);
 	err = kmod_lookup_alias_from_kernel_builtin_file(ctx, alias, list);
-	if (err == -ENOSYS) {
+	if (err == 0 || err == -ENOSYS) {
 		/* Optional index missing, try the old one */
 		DBG(ctx, "lookup modules.builtin %s\n", alias);
 		err = kmod_lookup_alias_from_builtin_file(ctx, alias, list);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-12 13:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 23:58 [PATCH] libkmod: Always search modules.builtin if no alias has been found Peter Kjellerstedt
2021-05-09  5:55 ` Lucas De Marchi
2021-05-10 13:55   ` Peter Kjellerstedt
2021-05-11 16:58     ` Lucas De Marchi
2021-05-11 18:01       ` Lucas De Marchi
2021-05-12 13:30         ` Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.