Bug 173958 - kernel crashes when remving an apparently unused module
Summary: kernel crashes when remving an apparently unused module
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 4
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: John W. Linville
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-23 02:28 UTC by JW
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-01-09 21:21:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description JW 2005-11-23 02:28:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217

Description of problem:
I have adsl modem attached to ethernet card with dhcp-assigned ip address.
Doing "ifcfg-eth1" shows the interface ok and it works fine.
But in /proc/modules (and lsmod) the module reference count shows as 0.
That implies that the module (3c59x in this instance) is not being used (ie. is unreferenced by anything).
But it is, of course, being used by a number of applications and the kernel itself.

Removal of the module "rmmod 3c59x" causes system freeze.

At least Windows would give BSOD! But Linux isn't quite as smart apparently.



Version-Release number of selected component (if applicable):
kernel-2.6.11-1.1369_FC4

How reproducible:
Always

Steps to Reproduce:
1.rmmod 3c59x
2.
3.
  

Actual Results:  no response - system dead and frozen - no kernel dump - no BSOD - nothing



Expected Results:  rmmod: module is busy


Additional info:

Instead of wasting valuable resources coding gross layers of rubbish like SeLinux perhaps more attention could be given to the fundamentals first.

Comment 1 Dave Jones 2005-11-23 05:43:07 UTC
The zero reference count is normal for network devices.

Does it still freeze with the errata kernel ?

Comment 2 JW 2005-11-23 06:03:18 UTC
Will be testing against kernel-2.6.14-1.1637_FC4 shortly.
First have to fix problems caused by upgrading 509 other modules, and drink
three more cups of coffee so as to stay excited about upgrading Fedora.



Comment 3 JW 2005-11-23 06:13:53 UTC
I really think that if a component of kernel is in use then it should have a
non-zero reference count.  Sounds logical enough to me.  I've tried very hard to
think of a reason why not ...

What if, for example, the NSA/CIA attaches a module that captures network
activity on my computer, how am I going to know it is there?

Ironic that SeLinux is developed but more obvious and blatant holes are
deliberately left in the kernel.


Comment 4 John W. Linville 2005-12-02 17:49:36 UTC
http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.3/0403.html 
 
If the NSA or CIA comes after you, I doubt if reference counting will make 
much difference... :-) 
 
Still, it probably shouldn't crash...I'll try to reproduce this soon.  In the 
meantime, could you verify that the problem is still present w/ the kernels 
here: 
 
   http://people.redhat.com/linville/kernels/fedora-netdev/ 
 
Please post the results here...thanks! 

Comment 5 John W. Linville 2006-01-09 21:21:01 UTC
Closed due to lack of response.  Please reopen when the requested information 
becomes available...thanks! 

Comment 6 JW 2006-01-09 23:23:00 UTC
You aren't going to find a lot of people prepared to crash their machine on a
regular basis. You need to find a volunteer who is interested in removing and
inserting 3c59x while it is still active (something that one would believe to be
impossible but the simple fact that it can be removed which active should in
itself be cause for concern).

I suggest that you approach Redhat and see if they can find the funds for a test
machine and a person who can perform the following steps:
  ifup eth0
  rmmod 3x59x
  ping www.redhat.com
  insmod 3x59x


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