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: <20191217075005.GB2474507@kroah.com>
Date:   Tue, 17 Dec 2019 08:50:05 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Tejun Heo <tj@...nel.org>,
        Marcin Pawlowski <mpawlowski@...com>,
        "Williams, Gerald S" <gerald.s.williams@...el.com>
Subject: Re: [PATCH 4.19 053/140] workqueue: Fix spurious sanity check
 failures in destroy_workqueue()

On Tue, Dec 17, 2019 at 01:38:10PM +0900, Nobuhiro Iwamatsu wrote:
> On Mon, Dec 16, 2019 at 06:48:41PM +0100, Greg Kroah-Hartman wrote:
> > From: Tejun Heo <tj@...nel.org>
> > 
> > commit def98c84b6cdf2eeea19ec5736e90e316df5206b upstream.
> > 
> > Before actually destrying a workqueue, destroy_workqueue() checks
> > whether it's actually idle.  If it isn't, it prints out a bunch of
> > warning messages and leaves the workqueue dangling.  It unfortunately
> > has a couple issues.
> > 
> > * Mayday list queueing increments pwq's refcnts which gets detected as
> >   busy and fails the sanity checks.  However, because mayday list
> >   queueing is asynchronous, this condition can happen without any
> >   actual work items left in the workqueue.
> > 
> > * Sanity check failure leaves the sysfs interface behind too which can
> >   lead to init failure of newer instances of the workqueue.
> > 
> > This patch fixes the above two by
> > 
> > * If a workqueue has a rescuer, disable and kill the rescuer before
> >   sanity checks.  Disabling and killing is guaranteed to flush the
> >   existing mayday list.
> > 
> > * Remove sysfs interface before sanity checks.
> > 
> > Signed-off-by: Tejun Heo <tj@...nel.org>
> > Reported-by: Marcin Pawlowski <mpawlowski@...com>
> > Reported-by: "Williams, Gerald S" <gerald.s.williams@...el.com>
> > Cc: stable@...r.kernel.org
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > 
> 
> This commit also requires the following commit:
> 
> commit 8efe1223d73c218ce7e8b2e0e9aadb974b582d7f
> Author: Tejun Heo <tj@...nel.org>
> Date:   Fri Sep 20 13:39:57 2019 -0700
> 
>     workqueue: Fix missing kfree(rescuer) in destroy_workqueue()
> 
>     Signed-off-by: Tejun Heo <tj@...nel.org>
>     Reported-by: Qian Cai <cai@....pw>
>     Fixes: def98c84b6cd ("workqueue: Fix spurious sanity check failures in destroy_workqueue()")
> 
> This is also required to 4.4, 4.9, 4.14 and 5.3.

Thank you for this, now queued up everywhere.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ