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: <ZYszuHEX6Pb-K4Au@mtj.duckdns.org>
Date: Wed, 27 Dec 2023 05:12:40 +0900
From: Tejun Heo <tj@...nel.org>
To: Lai Jiangshan <jiangshanlai@...il.com>
Cc: linux-kernel@...r.kernel.org, Naohiro.Aota@....com,
	kernel-team@...a.com
Subject: Re: [PATCH 08/10] workqueue: Introduce struct wq_node_nr_active

On Tue, Dec 26, 2023 at 05:14:18PM +0800, Lai Jiangshan wrote:
> On Wed, Dec 20, 2023 at 3:26 PM Tejun Heo <tj@...nel.org> wrote:
> 
> > @@ -1498,12 +1539,21 @@ static bool pwq_tryinc_nr_active(struct pool_workqueue *pwq)
> >  {
> >         struct workqueue_struct *wq = pwq->wq;
> >         struct worker_pool *pool = pwq->pool;
> > -       bool obtained;
> > +       struct wq_node_nr_active *nna = wq_node_nr_active(wq, pool->node);
> > +       bool obtained = false;
> >
> >         lockdep_assert_held(&pool->lock);
> >
> > -       obtained = pwq->nr_active < wq->max_active;
> > +       if (!nna) {
> > +               /* per-cpu workqueue, pwq->nr_active is sufficient */
> > +               obtained = pwq->nr_active < wq->max_active;
> > +               goto out;
> > +       }
> 
> For unbound workqueue, it is not checked against wq->max_active anymore
> and it is increased unconditionally.  Is it by design?

Ah, I made a mistake while splitting the patches. This gets added by a later
patch but this step should have an explicit check against wq->max_active.
Lemme add a check for the unbound path.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ