Bug 175315 - RFE: don't try loading a given module more than once
Summary: RFE: don't try loading a given module more than once
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-08 20:16 UTC by Nalin Dahyabhai
Modified: 2014-03-17 02:57 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-01-31 21:46:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nalin Dahyabhai 2005-12-08 20:16:15 UTC
Description of problem:
While trying to isolate a problem, I modified rc.sysinit to print the name of
the module which is being loaded by load_module() and noticed that duplicates
aren't screened out.

Version-Release number of selected component (if applicable):
8.18-1

How reproducible:
Always

Steps to Reproduce:
1. Have load_module() print the name of the module before attempting to load it.
2. Reboot.
  
Actual results:
You may end up getting duplicates (if you have multiple on-board USB
controllers, for example).

Expected results:
Not to see that, maybe a negligibly faster bootup.

Additional info:
(Ab)using $blacklist by adding names of modules to it as we attempt to load it
appears to do the trick:

@@ -197,6 +197,7 @@
        for module in $blacklist ; do
                [ "$1" = "$module" ] && return
        done
+       blacklist="$blacklist $1"
        modprobe $1 >/dev/null 2>&1
 }

Comment 1 Bill Nottingham 2005-12-08 22:27:18 UTC
This is going to get moved to udev shortly, actually.

Comment 2 Bill Nottingham 2006-01-31 21:46:34 UTC
load_module is dead. Hooray.


Note You need to log in before you can comment on or make changes to this bug.