lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b05f0157-4229-4b4b-ac96-62c9703f145b@stanley.mountain>
Date: Fri, 13 Dec 2024 17:51:02 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	Vlastimil Babka <vbabka@...e.cz>, Chen Yu <yu.c.chen@...el.com>,
	Yafang Shao <laoar.shao@...il.com>,
	Mickaël Salaün <mic@...ikod.net>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] kthread: Fix a NULL vs IS_ERR() bug

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@...aro.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ