you are right of course. this is kernel API. it can't be called from user space. but when you call it from kernel space, you must be calling with a process context. e.g. calling from init_module is ok. calling from the timer interrupt handler is not ok.
Yes, I know that. But the task_struct{}'s mm field of kernel thread is NULL. In another word, kernel thread has no user space address. However a user thread must have the user space addresses, so where the mm struct of the user thread comes from when a kernel thread becomes a user thread? I didn't find the code from call_usermodehelper() function. Thanks in advance! Regards, Cheng -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/