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]
Date: Tue, 20 Feb 2024 08:53:14 -1000
From: Tejun Heo <tj@...nel.org>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	allen.lkml@...il.com, kernel-team@...a.com
Subject: Re: [PATCH 13/17] workqueue: Remove WORK_OFFQ_CANCELING

On Tue, Feb 20, 2024 at 03:23:53PM +0800, Lai Jiangshan wrote:
> Hello, Tejun
> 
> On Sat, Feb 17, 2024 at 2:06 AM Tejun Heo <tj@...nel.org> wrote:
> 
> > @@ -2631,19 +2567,13 @@ bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq,
> >                          struct delayed_work *dwork, unsigned long delay)
> >  {
> >         unsigned long irq_flags;
> > -       int ret;
> > +       bool ret;
> >
> > -       do {
> > -               ret = try_to_grab_pending(&dwork->work, WORK_CANCEL_DELAYED,
> > -                                         &irq_flags);
> > -       } while (unlikely(ret == -EAGAIN));
> > +       ret = work_grab_pending(&dwork->work, WORK_CANCEL_DELAYED, &irq_flags);
> >
> > -       if (likely(ret >= 0)) {
> > -               __queue_delayed_work(cpu, wq, dwork, delay);
> > -               local_irq_restore(irq_flags);
> > -       }
> > +       __queue_delayed_work(cpu, wq, dwork, delay);
> 
> The disable count has to be checked before queuing it.

Ah, right, this also needs a clear_pending_if_disabled() call.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ