Re: Re: How does kernel thread create user process?

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

 



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/


[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