summaryrefslogtreecommitdiff
path: root/samples/configfs
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2019-09-19 04:43:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-17 22:39:25 +0300
commit05905c2f2123a80dd8bdeee7f3178303ec97d08f (patch)
treea1671468c1cf16db4846847cb3134e537367a51f /samples/configfs
parent6b3a529808ab7d3a936d0253d4b3195262af8b83 (diff)
downloadlinux-05905c2f2123a80dd8bdeee7f3178303ec97d08f.tar.xz
workqueue: Fix spurious sanity check failures in destroy_workqueue()
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@kernel.org> Reported-by: Marcin Pawlowski <mpawlowski@fb.com> Reported-by: "Williams, Gerald S" <gerald.s.williams@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples/configfs')
0 files changed, 0 insertions, 0 deletions