summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2023-03-10 16:03:23 -0600
committerChristian Brauner (Microsoft) <brauner@kernel.org>2023-03-12 10:52:46 +0100
commitcf587db2ee0261c74d04f61f39783db88a0b65e4 (patch)
tree5fecb82e0ea27438d473a165f274b9355ce0cd42 /init
parente0a98139c162af9601ffa8d6db88dbe745f64b3c (diff)
downloadlinux-cf587db2ee0261c74d04f61f39783db88a0b65e4.tar.gz
linux-cf587db2ee0261c74d04f61f39783db88a0b65e4.tar.bz2
linux-cf587db2ee0261c74d04f61f39783db88a0b65e4.zip
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>
Diffstat (limited to 'init')
-rw-r--r--init/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index 4425d1783d5c..49b5e1ef53f0 100644
--- a/init/main.c
+++ b/init/main.c
@@ -707,7 +707,7 @@ noinline void __ref rest_init(void)
rcu_read_unlock();
numa_default_policy();
- pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES);
+ pid = kernel_thread(kthreadd, NULL, NULL, CLONE_FS | CLONE_FILES);
rcu_read_lock();
kthreadd_task = find_task_by_pid_ns(pid, &init_pid_ns);
rcu_read_unlock();