mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
uml: kernel_thread shouldn't panic
kernel_thread() should just return an error value on do_fork failure, not panic. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
1ffb9164f5
commit
ccdddb5787
@ -97,8 +97,6 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
|
|||||||
current->thread.request.u.thread.arg = arg;
|
current->thread.request.u.thread.arg = arg;
|
||||||
pid = do_fork(CLONE_VM | CLONE_UNTRACED | flags, 0,
|
pid = do_fork(CLONE_VM | CLONE_UNTRACED | flags, 0,
|
||||||
¤t->thread.regs, 0, NULL, NULL);
|
¤t->thread.regs, 0, NULL, NULL);
|
||||||
if(pid < 0)
|
|
||||||
panic("do_fork failed in kernel_thread, errno = %d", pid);
|
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user