Skip to contentSkip to conversation

Fix instmods recursing indefinitely

PATCH New Seewer Philippe 1 participant 1 message Feb 27, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix instmods recursing indefinitely

the instmod function inside dracut-functions starts to recurses indefinitely if modprobe --show-depends is used and the output contains module options.

Example:

#modprobe --show-depends libata
insmod /lib/modules/2.6.27-11-generic/kernel/drivers/acpi/dock.ko insmod /lib/modules/2.6.27-11-generic/kernel/drivers/scsi/scsi_mod.ko insmod /lib/modules/2.6.27-11-generic/kernel/drivers/ata/libata.ko ignore_hpa=1

This patch fixes this.

--
dracut-functions | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
dracut-functions +0 -0
index 852ce36..56b3757 100755
@@ -177,7 +177,7 @@ instmods() {
	    =*) instmods $mpargs $(cat "${modcat}.${mod#=}");;
	    --*) mpargs+=" $mod";;
	    *) modprobe $mpargs --set-version $kernel --show-depends $mod \
-		2>/dev/null |while read cmd modpath; do
+		2>/dev/null |while read cmd modpath options; do
		    [[ $cmd = insmod ]] || continue
		    modname=${modpath##*/}
		    modname=${modname%.ko}

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html