* [PATCH] kthread: remove worker->task self-assignment
@ 2026-08-29 16:01 Bradley Morgan
0 siblings, 0 replies; 2+ messages in thread
From: Bradley Morgan @ 2026-08-29 16:01 UTC (permalink / raw)
To: Frederic Weisbecker, Tejun Heo; +Cc: Peter Zijlstra, linux-kernel, brads
From: Bradley Morgan <brads@mainlining.org>
All kthread worker users now create their workers with
kthread_create_worker*(), which sets worker->task before the worker
starts. The self-assignment in kthread_worker_fn() is dead code now.
Remove it.
Signed-off-by: Bradley Morgan <brads@mainlining.org>
---
kernel/kthread.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 63beb59b7a3d..18bc702e8d2d 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -987,13 +987,6 @@ int kthread_worker_fn(void *worker_ptr)
struct kthread_worker *worker = worker_ptr;
struct kthread_work *work;
- /*
- * FIXME: Update the check and remove the assignment when all kthread
- * worker users are created using kthread_create_worker*() functions.
- */
- WARN_ON(worker->task && worker->task != current);
- worker->task = current;
-
if (worker->flags & KTW_FREEZABLE)
set_freezable();
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] kthread: remove worker->task self-assignment
2026-08-29 16:11 [RESEND PATCH 0/5] " Bradley Morgan
@ 2026-08-29 16:18 ` Bradley Morgan
0 siblings, 0 replies; 2+ messages in thread
From: Bradley Morgan @ 2026-08-29 16:18 UTC (permalink / raw)
To: Frederic Weisbecker, Tejun Heo; +Cc: Peter Zijlstra, linux-kernel, brads
From: Bradley Morgan <brads@mainlining.org>
All kthread worker users now create their workers with
kthread_create_worker*(), which sets worker->task before the worker
starts. The self-assignment in kthread_worker_fn() is dead code now.
Remove it.
Signed-off-by: Bradley Morgan <brads@mainlining.org>
---
kernel/kthread.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 63beb59b7a3d..18bc702e8d2d 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -987,13 +987,6 @@ int kthread_worker_fn(void *worker_ptr)
struct kthread_worker *worker = worker_ptr;
struct kthread_work *work;
- /*
- * FIXME: Update the check and remove the assignment when all kthread
- * worker users are created using kthread_create_worker*() functions.
- */
- WARN_ON(worker->task && worker->task != current);
- worker->task = current;
-
if (worker->flags & KTW_FREEZABLE)
set_freezable();
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-29 16:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-29 16:01 [PATCH] kthread: remove worker->task self-assignment Bradley Morgan
2026-08-29 16:11 [RESEND PATCH 0/5] " Bradley Morgan
2026-08-29 16:18 ` [PATCH] " Bradley Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®