Don't die in kthread_create()

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2021-02-24 00:39:01 -05:00
parent 9e5d774875
commit fb2d506f6f

View File

@ -80,7 +80,7 @@ struct task_struct *kthread_create(int (*thread_fn)(void *data),
ret = pthread_create(&p->thread, &attr, kthread_start_fn, p);
if (ret)
die("pthread_create error %s", strerror(ret));
return ERR_PTR(-ret);
pthread_setname_np(p->thread, p->comm);
return p;
}