RE: call_usermodehelper() kernel panic!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi, i was trying to execute an user space program through a kernel
module,
> i've used the same method of linux-$KERNELVERSION/drivers/usb/usb.c,
and
> this is the interesting code..
> 
> 	[...]
> 	char *argv[3];
> 	char *envp[3];
> 
> 	argv [0] = "/usr/sbin/httpd";
> 	argv [1] = "httpd";
> 	argv [2] = 0;
> 
> 	envp[0] = "HOME=/";
> 	envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
> 	envp[2] = 0;
> 
> 	call_usermodehelper(argv [0], argv, envp);
> 	[...]
> 
> but when I run it, it causes a kernel panic during the
> call_usermodehelper() call.. this is the kernel panic message:
> 
> kernel BUG at sched.c:564
> invalid operand: 0000
> CPU: 0
> EIP: 0010:[<c0114d7b] Not tainted
> EFLAGS: 00010282
> [...]
> <0> Kernel panic: Aiee, killing interrupt handler!
> In interrupt handler - not syncing
> 


Are you calling call_usermodehelper() from within an interrupt handler ?

I believe call_usermodehelper() must be called from a context that can
wait.

To test this you can try to use the define in_atomic(). If it returns
TRUE then you are in a context that can't wait.

dom

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux