This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 175315 - RFE: don't try loading a given module more than once
RFE: don't try loading a given module more than once
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-08 15:16 EST by Nalin Dahyabhai
Modified: 2014-03-16 22:57 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-31 16:46:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nalin Dahyabhai 2005-12-08 15:16:15 EST
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 17:27:18 EST
This is going to get moved to udev shortly, actually.
Comment 2 Bill Nottingham 2006-01-31 16:46:34 EST
load_module is dead. Hooray.

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