acpi, nfit: fix module unload vs workqueue shutdown race
authorDan Williams <dan.j.williams@intel.com>
Tue, 18 Apr 2017 16:56:31 +0000 (09:56 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 18 Apr 2017 17:55:37 +0000 (10:55 -0700)
commitfbabd829fe76a72a6444f64361cf8b2a9848639d
treed2fe120c94ec375c6cf44e822b2435ffa39819f0
parent8b06b884cd98f7ec8b5028680b99fabfb7b3e192
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>
drivers/acpi/nfit/core.c
drivers/acpi/nfit/nfit.h
tools/testing/nvdimm/test/nfit.c