I suggest you take a look at insmod's source code and see if you can
implement that in your module, I never looked at it but it must be quite
simple and straightforward. Using system() is quite an ugly patch.
Are you trying to do that from inside the same module you are trying to
load/unload?
Or is it from a module or an app?
More details! Code snippets! Be clear.
----- Original Message -----
From: "Olaf Petzold" <[EMAIL PROTECTED]>
To: "Ian Schofield" <[EMAIL PROTECTED]>
Cc: "RTLinux mailing list" <[EMAIL PROTECTED]>
Sent: Monday, March 12, 2001 4:12 AM
Subject: Re: [rtl] Modules question
> > Hi,
> Hi,
>
> > I have a similar question to the one quoted below. The only problem
is, I
> crash the > kernel when I attempt to use the system() command to insert
and
> remove my kernel > module.
> >
> > This is the command I'm using...
> > x = system("/sbin/insmod /usr/rtlinux/examples/adc2/int.o");
> >
> > I get a screenfull of info, which includes the following...
> >
> > ...
> > Unable to handle kernel NULL pointer dereference @ virtual address
00000000....
> > Kernel Panic
> > in swapper task - not syncing
> > ...
>
> A normal insmod int.o is working ? On my experience crashing on insmod
from a
> user space program is due to a fault of the kernel module.
>
> Regards
> Olaf
>
> PS: from the man page:
>
> Do not use system() from a program with suid or sgid priv
> ileges, because strange values for some environment vari
> ables might be used to subvert system integrity. Use the
> exec(3) family of functions instead, but not execlp(3) or
> execvp(3). system() will not, in fact, work properly from
> programs with suid or sgid privileges on systems on which
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/