[PATCH] kthread: Always save the full_name
From: Mike Christie
Date: Sat Mar 11 2023 - 17:14:24 EST
Simplify the kthread name handling by always using the full_name.
---
kernel/kthread.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 831a55b406d8..5596ec3f75cf 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -349,10 +349,7 @@ static int kthread(void *_create)
kthread_exit(-EINTR);
}
- if (strlen(create->full_name) >= TASK_COMM_LEN)
- self->full_name = create->full_name;
- else
- kfree(create->full_name);
+ self->full_name = create->full_name;
self->threadfn = threadfn;
self->data = data;