← Commit list

4b5827a69

Rob Landley
Rob Landley
2006-08-22
SOURCE BUG Duration: 35s

Subject

Patch from Yann Morin so modprobe won't return failure if the module gets loaded while it's running (ala multi-device hotplug).

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

modutils/modprobe.c+11 -2
@@ -679,7 +679,7 @@ static int mod_process ( struct mod_list_t *list, int do_insert )
}
if (!show_only) {
int rc2 = wait4pid(spawn(argv));
-
+
if (do_insert) {
rc = rc2; /* only last module matters */
}
@@ -859,7 +859,16 @@ static int mod_insert ( char *mod, int argc, char **argv )
}
// process tail ---> head
- rc = mod_process ( tail, 1 );
+ if ((rc = mod_process ( tail, 1 )) != 0) {
+ /*
+ * In case of using udev, multiple instances of modprobe can be
+ * spawned to load the same module (think of two same usb devices,
+ * for example; or cold-plugging at boot time). Thus we shouldn't
+ * fail if the module was loaded, and not by us.
+ */
+ if (already_loaded (mod) )
+ rc = 0;
+ }
}
else
rc = 1;