Bug 134378 - (IT_50816) pcmcia init script calls modprobe with '.o' appended to module names
pcmcia init script calls modprobe with '.o' appended to module names
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel-pcmcia-cs (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
Brian Brock
Depends On:
Blocks: 170417
  Show dependency treegraph
Reported: 2004-10-01 15:53 EDT by David Lehman
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-02 16:59:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch to /etc/init.d/pcmcia for correct modprobe/insmod usage (811 bytes, patch)
2004-10-01 15:56 EDT, David Lehman
no flags Details | Diff

  None (edit)
Description David Lehman 2004-10-01 15:53:46 EDT
Description of problem:
/etc/init.d/pcmcia calls 'modprobe pcmcia_core.o' instead of 'modprobe
pcmcia_core', which breaks.

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

How reproducible:

Steps to Reproduce:
1. install some pcmcia modules into /lib/modules/`uname -r`/pcmcia/
2. reboot
Actual results:
Bunch of "pcmcia: modprobe: Can't locate module" errors

Expected results:
successfully finds and loads the modules

Additional info:
This has been fixed in RHL/FC track, just needs merging into RHEL3.
Here are the previous bugs:
Comment 1 David Lehman 2004-10-01 15:56:19 EDT
Created attachment 104646 [details]
patch to /etc/init.d/pcmcia for correct modprobe/insmod usage
Comment 2 Matthew Booth 2004-10-29 06:29:10 EDT
In case any context is needed, this code path is only executed when
/lib/modules/`uname -r`/pcmcia exists, which it doesn't for kernels
installed via rpm. However, it does exist for kernels compiled from
the kernel-source rpm. The other code path is fixed.
Comment 3 Eric Paris 2004-11-23 10:09:19 EST
You say the other path is fixed, but can we not also get it fixed in
case people do compile their own kernel?  I know they would be
unsupported, but they should have the freedom to do so.
Comment 4 Pete Zaitcev 2005-06-28 14:28:09 EDT
The bug comes from Arjan's fix:

* Tue Nov 26 2002 Arjan van de Ven <arjanv@redhat.com>
- exclude range for Radeon ICP chipsets
- use modprobe not insmod

--- pcmcia-cs-3.1.31/etc/rc.pcmcia~	2002-11-26 16:46:12.000000000 +0100
+++ pcmcia-cs-3.1.31/etc/rc.pcmcia	2002-11-26 16:46:12.000000000 +0100
@@ -104,9 +104,9 @@
 	    KD=/lib/modules/`uname -r`/kernel/drivers/pcmcia
 	    if [ -d $PC ] ; then
 		echo -n " modules"
-		/sbin/insmod $PC/pcmcia_core.o $CORE_OPTS
-		/sbin/insmod $PC/$PCIC.o $PCIC_OPTS
-		/sbin/insmod $PC/ds.o
+		/sbin/modprobe pcmcia_core.o $CORE_OPTS
+		/sbin/modprobe $PCIC.o $PCIC_OPTS
+		/sbin/modprobe ds.o
 	    elif [ -d $KD ] ; then
 		/sbin/modprobe pcmcia_core
 		/sbin/modprobe $PCIC

Arjan, what's up with that? This is obviously bogus. Whatever that was
supposed to fix, it never worked right. May I back it out?
Comment 5 Arjan van de Ven 2005-06-28 14:31:35 EDT
backing out is the wrong thing, the reason the original code was wrong is that
the modules changed location between 2.2 and 2.4 kernels, and this code assumed
the 2.2 location (well technically it assumes the location pcmcia-cs puts it's
OWN modules, while we want the kernel ones).

right fix is to drop the .o 
Comment 6 Eric Paris 2005-08-11 10:48:09 EDT
This appears to have been fixed in CVS in version

This is a small bug that will not hit default installs but would affect people
who build their own modules or kernels.  The customer ticket has been open a
long time and they have verified that this would fix the problem.  Deffinitly
not a high priority, but obviously broken and already fiked in RHEL3 CVS

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