summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-04-18 09:56:31 -0700
committerDan Williams <dan.j.williams@intel.com>2017-04-18 10:55:37 -0700
commitfbabd829fe76a72a6444f64361cf8b2a9848639d (patch)
treed2fe120c94ec375c6cf44e822b2435ffa39819f0 /tools/testing
parent8b06b884cd98f7ec8b5028680b99fabfb7b3e192 (diff)
downloadop-kernel-dev-fbabd829fe76a72a6444f64361cf8b2a9848639d.zip
op-kernel-dev-fbabd829fe76a72a6444f64361cf8b2a9848639d.tar.gz
acpi, nfit: fix module unload vs workqueue shutdown race
The workqueue may still be running when the devres callbacks start firing to deallocate an acpi_nfit_desc instance. Stop and flush the workqueue before letting any other devres de-allocations proceed. Reported-by: Linda Knippers <linda.knippers@hpe.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/nvdimm/test/nfit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
index d7fb1b8..c218717 100644
--- a/tools/testing/nvdimm/test/nfit.c
+++ b/tools/testing/nvdimm/test/nfit.c
@@ -1851,6 +1851,10 @@ static int nfit_test_probe(struct platform_device *pdev)
if (rc)
return rc;
+ rc = devm_add_action_or_reset(&pdev->dev, acpi_nfit_shutdown, acpi_desc);
+ if (rc)
+ return rc;
+
if (nfit_test->setup != nfit_test0_setup)
return 0;
OpenPOWER on IntegriCloud