Bug 173958 - kernel crashes when remving an apparently unused module
kernel crashes when remving an apparently unused module
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: John W. Linville
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-11-22 21:28 EST by JW
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-09 16:21:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description JW 2005-11-22 21:28:09 EST
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):

How reproducible:

Steps to Reproduce:
1.rmmod 3c59x

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 00:43:07 EST
The zero reference count is normal for network devices.

Does it still freeze with the errata kernel ?
Comment 2 JW 2005-11-23 01:03:18 EST
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 01:13:53 EST
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 12:49:36 EST
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 
Please post the results here...thanks! 
Comment 5 John W. Linville 2006-01-09 16:21:01 EST
Closed due to lack of response.  Please reopen when the requested information 
becomes available...thanks! 
Comment 6 JW 2006-01-09 18:23:00 EST
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.