From: Dan Carpenter <dan.carpenter@linaro.org>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Vlastimil Babka" <vbabka@suse.cz>,
"Chen Yu" <yu.c.chen@intel.com>,
"Yafang Shao" <laoar.shao@gmail.com>,
"Mickaël Salaün" <mic@digikod.net>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] kthread: Fix a NULL vs IS_ERR() bug
Date: Fri, 13 Dec 2024 17:51:02 +0300 [thread overview]
Message-ID: <b05f0157-4229-4b4b-ac96-62c9703f145b@stanley.mountain> (raw)
In-Reply-To: <Z1xIAezMPKXAj9MC@localhost.localdomain>
On Fri, Dec 13, 2024 at 03:43:13PM +0100, Frederic Weisbecker wrote:
> Le Fri, Dec 13, 2024 at 05:25:02PM +0300, Dan Carpenter a écrit :
> > The kthread_create_worker_on_node() function returns error pointers,
> > never NULL. Fix the check to match.
> >
> > Fixes: e9853c812f86 ("treewide: Introduce kthread_run_worker[_on_cpu]()")
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> > ---
> > kernel/kthread.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/kernel/kthread.c b/kernel/kthread.c
> > index 83bf73d2355c..922f15762ec3 100644
> > --- a/kernel/kthread.c
> > +++ b/kernel/kthread.c
> > @@ -1124,7 +1124,7 @@ kthread_create_worker_on_cpu(int cpu, unsigned int flags,
> > struct kthread_worker *worker;
> >
> > worker = kthread_create_worker_on_node(flags, cpu_to_node(cpu), namefmt, cpu);
> > - if (worker)
> > + if (!IS_ERR(worker))
> > kthread_bind(worker->task, cpu);
>
> Whoops!
>
> Can I fold this to the offending patch? I can add your
> Co-developed-by: / Signed-off-by: ?
Sure. Just add my Signed-off-by probably. Co-developed-by seems too
much.
regards,
dan carpenter
prev parent reply other threads:[~2024-12-13 14:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 14:25 Dan Carpenter
2024-12-13 14:43 ` Frederic Weisbecker
2024-12-13 14:51 ` Dan Carpenter [this message]
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=b05f0157-4229-4b4b-ac96-62c9703f145b@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=frederic@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mic@digikod.net \
--cc=vbabka@suse.cz \
--cc=yu.c.chen@intel.com \
/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®