LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2008, 06:24 AM   #1
iamjayanth
Member
 
Registered: Oct 2008
Posts: 51

Rep: Reputation: 15
how can insertion of one module deletes other modules


Masters,

I have inserted a linux module which controlls the bandwidth of LAN . Just when I insmod'ed kernel panicked. When restarted I am stunned to find out that many of my other modules are missing. How can insertion of one module removes other modules . I use 2.6.9 kernel on a redhat 3.4.3 version.

The module i inserted did worked well in 2.4 kernel. I tried to insert this same module in to kernel 2.6 expecting to see some error. I never expected that I would loss some modules. I am using kernel threading in the module and i have heard kernel threading for 2.4 and 2.6 are different. But i didnt expect it would eat my modules. Can any one tell me what is the reason behind me losing my modules.
Thanking you .
 
Old 10-31-2008, 10:53 PM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by iamjayanth View Post
Masters,

I have inserted a linux module which controlls the bandwidth of LAN . Just when I insmod'ed kernel panicked. When restarted I am stunned to find out that many of my other modules are missing. How can insertion of one module removes other modules . I use 2.6.9 kernel on a redhat 3.4.3 version.
The insertion of a module, per sé, shouldn't remove any module from memory, let alone the disk.

But, if the kernel crashed, there's a chance that any file that was open at that moment has been corrupted, erased or whatever. That's how crashes work

You should run fsck for all your drives (at least the ones that were mounted when the crash happened).

Quote:
The module i inserted did worked well in 2.4 kernel. I tried to insert this same module in to kernel 2.6 expecting to see some error. I never expected that I would loss some modules. I am using kernel threading in the module and i have heard kernel threading for 2.4 and 2.6 are different.
Mmmm, I wonder how did you compile a module for 2.4 against a 2.6 kernel tree. Or did you just copy the .ko file and tried to run it?

Quote:
But i didnt expect it would eat my modules. Can any one tell me what is the reason behind me losing my modules.
The crash and/or the hard reboot (most probably).

Last edited by i92guboj; 10-31-2008 at 11:02 PM.
 
Old 10-31-2008, 11:25 PM   #3
iamjayanth
Member
 
Registered: Oct 2008
Posts: 51

Original Poster
Rep: Reputation: 15
My module worked perfectly well for 2.4 . But when I run the same module on 2.6 some errors where present. Since I am using kernel threads I expected some errors . But none of the errors where based on thread . I made some minor corrections to the module source code like workqueue structure for tq structure. And thus I run make successfully. I havent copied .ko files in to 2.6.

When I insmoded the module some errors like unknown symbols where shown. I changed a expresion in the code and those errors where gone. Then I insmoded kernel panicked and rest you know.
 
Old 10-31-2008, 11:36 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by iamjayanth View Post
My module worked perfectly well for 2.4 . But when I run the same module on 2.6 some errors where present. Since I am using kernel threads I expected some errors . But none of the errors where based on thread . I made some minor corrections to the module source code like workqueue structure for tq structure. And thus I run make successfully. I havent copied .ko files in to 2.6.
I see. I had to ask. I had not clear if the module was programmed by you or anyone else.

Quote:
When I insmoded the module some errors like unknown symbols where shown. I changed a expresion in the code and those errors where gone. Then I insmoded kernel panicked and rest you know.
Yep. Then the crash might explain the problem you are experiencing. Overall, if fsck can find errors, in that case the cause of the problem will be almost crystal clear to me. It seems that you will have to do some extra analysis and debugging on your module before you can use it on 2.6.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling stripped down kernel deletes modules used by other kernels yougene Slackware 10 11-30-2005 01:44 AM
2.6.11 kernel compile - sound module insertion errors dibblethewrecke Linux - Hardware 3 03-17-2005 11:50 PM
kernel module insertion using insmod on kernel 2.4.20-8, rh 9.0 gooner Red Hat 1 05-27-2004 05:31 AM
/etc/conf.modules is more recent than /lib/module/2.2.15-4mdk/modules.dep Derek-kun Linux - Newbie 3 09-26-2003 02:56 AM
Module Errors with no modules used? mikeyt_333 Linux - General 4 02-02-2002 10:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration