lkml.org 
[lkml]   [2005]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.14, udev: unknown symbols for ehci_hcd

On Sat, Nov 05, 2005 at 06:31:04PM +0100, Kay Sievers wrote:
> I've got these messages several times on the experimental SUSE too,
> but can't reproduce it so far, even without Rusty's patch to modprobe
> they have disappeared. See here for the details:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333052


Just to let you know, I've also met this problem (on another distro),
and did not know about this bugreport until now.
So I've done another workaround: modprobe already parses /proc/modules
to check whether the modules needed are already loaded, and this file
also shows us the state of the modules, being "Loading", "Live" or
"Unloading".

With my patch, modprobe waits until the needed modules come out of the
"Loading" or "Unloading" state.


--
pozsy


--- module-init-tools-3.2-pre4.orig/modprobe.c 2005-05-08 09:38:52.000000000 +0200
+++ module-init-tools-3.2-pre4/modprobe.c 2005-10-24 13:19:39.000000000 +0200
@@ -363,6 +363,7 @@
FILE *proc_modules;
char *line;

+start:
/* Might not be mounted yet. Don't fail. */
proc_modules = fopen("/proc/modules", "r");
if (!proc_modules)
@@ -373,12 +374,31 @@

if (entry && strcmp(entry, modname) == 0) {
/* If it exists, usecount is the third entry. */
- if (usecount) {
- entry = strtok(NULL, " \n");
- if (entry
- && (entry = strtok(NULL, " \n")) != NULL)
+ if (!(entry = strtok(NULL, " \n")))
+ goto out;
+
+ if (!(entry = strtok(NULL, " \n"))) /* usecount */
+ goto out;
+ else
+ if (usecount)
*usecount = atoi(entry);
+
+ if (!(entry = strtok(NULL, " \n"))) /* "-" */
+ goto out;
+
+ if (!(entry = strtok(NULL, " \n"))) /* status */
+ goto out;
+ else {
+ if (!strcmp(entry, "Loading") || !strcmp(entry, "Unloading")) {
+ usleep(100000);
+ free(line);
+ fclose(proc_modules);
+ goto start;
+ }
+ goto out;
}
+
+ out:
free(line);
fclose(proc_modules);
return 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-11-05 19:50    [W:0.130 / U:0.104 seconds]
©2003-2011 Jasper Spaans. Advertise on this site