Bug 54123 - MTD cfi_cmdset_0001 cannot be unloaded due to use count
Summary: MTD cfi_cmdset_0001 cannot be unloaded due to use count
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-27 22:17 UTC by Just E
Modified: 2007-04-18 16:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-06-07 18:16:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Just E 2001-09-27 22:17:43 UTC
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.