mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
kernel: Allow a kernel thread's name to be set in copy_process
This patch allows kernel users to pass in the thread name so it can be set during creation instead of having to use set_task_comm after the thread is created. Signed-off-by: Mike Christie <michael.christie@oracle.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner (Microsoft)
parent
e0a98139c1
commit
cf587db2ee
@@ -396,7 +396,8 @@ static void create_kthread(struct kthread_create_info *create)
|
||||
current->pref_node_fork = create->node;
|
||||
#endif
|
||||
/* We want our own signal handler (we take no signals by default). */
|
||||
pid = kernel_thread(kthread, create, CLONE_FS | CLONE_FILES | SIGCHLD);
|
||||
pid = kernel_thread(kthread, create, NULL,
|
||||
CLONE_FS | CLONE_FILES | SIGCHLD);
|
||||
if (pid < 0) {
|
||||
/* Release the structure when caller killed by a fatal signal. */
|
||||
struct completion *done = xchg(&create->done, NULL);
|
||||
|
||||
Reference in New Issue
Block a user