Bug 134378 (IT_50816)

Summary: pcmcia init script calls modprobe with '.o' appended to module names
Product: Red Hat Enterprise Linux 3 Reporter: David Lehman <dlehman>
Component: kernel-pcmcia-csAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: benl, davej, mbooth, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: RHEL3U7NAK
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-02 20:59:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 170417    
Attachments:
Description Flags
patch to /etc/init.d/pcmcia for correct modprobe/insmod usage none

Description David Lehman 2004-10-01 19:53:46 UTC
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):
kernel-pcmcia-cs-3.1.31-13

How reproducible:
Fully

Steps to Reproduce:
1. install some pcmcia modules into /lib/modules/`uname -r`/pcmcia/
2. reboot
3.
  
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:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=81282
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=113796

Comment 1 David Lehman 2004-10-01 19:56:19 UTC
Created attachment 104646 [details]
patch to /etc/init.d/pcmcia for correct modprobe/insmod usage

Comment 2 Matthew Booth 2004-10-29 10:29:10 UTC
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 15:09:19 UTC
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 18:28:09 UTC
The bug comes from Arjan's fix:

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

pcmcia-cs-3.1.18-script.patch:
--- 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 18:31:35 UTC
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 14:48:09 UTC
This appears to have been fixed in CVS in version
RHEL-3/kernel-pcmcia-cs-3.1.31-14.src.rpm

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