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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALm+0cU_B24pHUWcM5_1N7bYPLkii5e5c_K8eTcev3YL7Y7-cQ@mail.gmail.com>
Date: Wed, 10 Jul 2024 14:21:08 +0800
From: Z qiang <qiang.zhang1211@...il.com>
To: paulmck@...nel.org
Cc: imran.f.khan@...cle.com, tglx@...utronix.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] smp: Fix missed destroy_work_on_stack() calls in smp_call_on_cpu()

>
> On Thu, Jul 04, 2024 at 02:52:13PM +0800, Zqiang wrote:
> > For builts with CONFIG_DEBUG_OBJECTS_WORK=y kernels, the sscs.work
> > defined using INIT_WORK_ONSTACK() will be initialized by
> > debug_object_init_on_stack() for debug check in __init_work().
> > This commit therefore invoke destroy_work_on_stack() to free
> > sscs.work debug objects before smp_call_on_cpu() returns.
> >
> > Signed-off-by: Zqiang <qiang.zhang1211@...il.com>
>
> I have queued this for testing.  My guess is that it should go to
> mainline some other way, so:
>
> Tested-by: Paul E. McKenney <paulmck@...nel.org>

Thanks Paul for testing this change ;) .

>
> > ---
> >  kernel/smp.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/kernel/smp.c b/kernel/smp.c
> > index cc13e73a887c..61f10f982341 100644
> > --- a/kernel/smp.c
> > +++ b/kernel/smp.c
> > @@ -1135,6 +1135,7 @@ int smp_call_on_cpu(unsigned int cpu, int (*func)(void *), void *par, bool phys)
> >
> >       queue_work_on(cpu, system_wq, &sscs.work);
> >       wait_for_completion(&sscs.done);
> > +     destroy_work_on_stack(&sscs.work);
> >
> >       return sscs.ret;
> >  }
> > --
> > 2.17.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ