[PATCH v2 0/5] kthread: convert remaining users to kthread_create_worker
From: Bradley Morgan
Date: Fri Sep 04 2026 - 06:15:25 EST
kthread_worker_fn() has carried a FIXME for a decade: it assigns
worker->task = current because the old kthread_run(kthread_worker_fn)
callers never told the worker what task it was. The new
kthread_create_worker*() API sets worker->task before the worker
starts, so the self assignment is dead code.
This series converts the four remaining users of the old pattern
(ivtv, encx24j600, sc16is7xx, cpufreq_schedutil) to the new API,
then removes the self assignment from kthread_worker_fn() while
keeping a WARN_ON() as a sanity check for any out-of-tree users.
v1 -> v2:
- Keep WARN_ON() as a bare sanity check (Frederic, Peter)
- Add comment explaining why the WARN_ON() is there
- Fix subject and changelog wording
Bradley Morgan (5):
media: ivtv: convert to kthread_run_worker
net: encx24j600: convert to kthread_run_worker
tty: sc16is7xx: convert to kthread_run_worker
cpufreq: schedutil: convert to kthread_create_worker
kthread: remove worker->task self assignment
drivers/media/pci/ivtv/ivtv-driver.c | 14 ++++----
drivers/media/pci/ivtv/ivtv-driver.h | 3 +-
drivers/net/ethernet/microchip/encx24j600.c | 20 +++++------
drivers/tty/serial/sc16is7xx.c | 39 ++++++++++-----------
kernel/kthread.c | 8 ++---
kernel/sched/cpufreq_schedutil.c | 33 ++++++++---------
6 files changed, 50 insertions(+), 67 deletions(-)
--
2.47.3