From: Frederic Weisbecker <frederic@kernel.org>
To: Bradley Morgan <include@grrlz.net>
Cc: Tejun Heo <tj@kernel.org>, Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, brads@mainlining.org
Subject: Re: [PATCH] kthread: remove worker->task self-assignment
Date: Tue, 1 Sep 2026 14:45:43 +0200 [thread overview]
Message-ID: <apbI91PzT2BaRazM@localhost.localdomain> (raw)
In-Reply-To: <20260829161848.20635-1-include@grrlz.net>
Hi,
Le Sat, Aug 29, 2026 at 04:18:48PM +0000, Bradley Morgan a écrit :
> 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.
How could it be created before?
>
> 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);
Should we keep a WARN_ON(worker->task != current) here?
Thanks.
> - worker->task = current;
> -
> if (worker->flags & KTW_FREEZABLE)
> set_freezable();
>
> --
> 2.47.3
--
Frederic Weisbecker
SUSE Labs
next prev parent reply other threads:[~2026-09-01 12:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 16:11 [RESEND PATCH 0/5] " Bradley Morgan
2026-08-29 16:13 ` [PATCH 1/5] media: ivtv: convert to kthread_run_worker Bradley Morgan
2026-08-29 16:15 ` [PATCH 2/5] net: encx24j600: " Bradley Morgan
2026-08-29 16:16 ` [PATCH 3/5] tty: sc16is7xx: " Bradley Morgan
2026-08-29 16:17 ` [PATCH 4/5] cpufreq: schedutil: convert to kthread_create_worker Bradley Morgan
2026-08-29 16:18 ` [PATCH] kthread: remove worker->task self-assignment Bradley Morgan
2026-09-01 12:45 ` Frederic Weisbecker [this message]
2026-09-01 12:49 ` Peter Zijlstra
2026-09-01 13:57 ` Bradley Morgan
2026-09-01 14:04 ` Bradley Morgan
2026-09-01 14:06 ` Frederic Weisbecker
2026-09-01 14:09 ` Bradley Morgan
2026-09-02 14:09 ` Frederic Weisbecker
2026-09-02 14:11 ` Bradley Morgan
2026-09-01 18:28 ` Bradley Morgan
2026-09-02 14:10 ` Frederic Weisbecker
-- strict thread matches above, loose matches on Subject: below --
2026-08-29 16:01 Bradley Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=apbI91PzT2BaRazM@localhost.localdomain \
--to=frederic@kernel.org \
--cc=brads@mainlining.org \
--cc=include@grrlz.net \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®