When we call fork(). It call to system call clone which call to do_fork function and inside this function, it call copy_process. copy_process call dup_task_struct which creates new kernel stack, new task_struct, new thread_info for new process. and if exec called it create new process.
But when does user space stack created in this sequence of creating process? I have same question for thread.
Does user space stack also has pointer to task_struct or thread_info type of structure ?
Please help me out here and correct me if I asked something silly.