Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-01-2005, 01:21 AM   #1
LQ Newbie
Registered: Sep 2005
Posts: 1

Rep: Reputation: 0
making sys call ex:insmod,rmmod from function in user module

I want to do insmod and rmmod from a function. This is because, i want to load a different driver version for some of the conditions i have. To do this, i need to invoke rmmod and insmod from the function, how can i do this?I am using linux kernel 2.6.
thanks in advance,
Old 09-01-2005, 01:36 AM   #2
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
a common way is to fork() then use then use something in the exec() family
execvp(program, args);

since modprobe and freinds only run as root depending on what you are doing if you are regular user you can use sudo..
in a production environment this would be a bad thing because funky kernel modules are a way for people to compromise your system


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a kernel module call the function of another kernel module sceadu Programming 3 05-02-2011 03:22 AM
Write sys call failing ppy Programming 1 11-05-2004 09:57 AM
rmmod - making the change permanent? DiBosco Linux - General 0 06-20-2004 06:32 AM
Kill sys call eshwar_ind Programming 4 05-07-2004 12:41 PM
can interrupt handler call user space function? pot_po Programming 0 11-07-2002 10:32 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:48 AM.

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