Bug 54123 - MTD cfi_cmdset_0001 cannot be unloaded due to use count
MTD cfi_cmdset_0001 cannot be unloaded due to use count
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-27 18:17 EDT by Just E
Modified: 2007-04-18 12:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-06-07 14:16:14 EDT
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 Just E 2001-09-27 18:17:43 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.19 i686)

Description of problem:
cfi_cmdset_0001 module cannot be unloaded from kernel due to use count > 0 
even when no other modules are "using" this module.

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


How reproducible:
Always

Steps to Reproduce:
1.  modprobe cfi_probe
2.  modprobe <some MTD translation driver that uses Intel commandset 1 CFI>
3.  rmmod <same module as in step two>
4.  rmmod cfi_cmdset_0001 <-- this fails because use count > 0
	

Actual Results:  The 'rmmod cfi_cmdset_0001' fails because the use count is
greater than zero even though no modules are listed as using it.

Expected Results:  The use count should have been decremented to zero once
all 'user' modules were unloaded.  The module would then unload properly.

Additional info:

This issue is fixed in the current MTD CVS (linux-mtd.infradead.org) but
not in the Roswell kernel 2.4.7-2.  A patch for Roswell 2.4.7-2 is appended
below-- this decrements the use count appropriately once an
inter_module_get object is no longer being used:

==== linux/drivers/mtd/chips/cfi_probe.c#1 -
linux/drivers/mtd/chips/cfi_probe.c ====
@@ -588,6 +588,7 @@
 
 	if (probe_function) {
 		(*probe_function)(map, primary, base);
+		inter_module_put(probename);
 		return;
 	}	
 #endif

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