]> git.baikalelectronics.ru Git - kernel.git/commit
nfit, address-range-scrub: fix scrub in-progress reporting
authorDan Williams <dan.j.williams@intel.com>
Mon, 2 Apr 2018 23:40:04 +0000 (16:40 -0700)
committerDan Williams <dan.j.williams@intel.com>
Tue, 3 Apr 2018 18:51:42 +0000 (11:51 -0700)
commite683074ebe4c03638c49e1364ad96e34e91aa867
tree9a16e2d9c3082c241c7055b0fcacac2ba6e6017e
parent2606f5abece47171a4583aff548b2ca710e50779
nfit, address-range-scrub: fix scrub in-progress reporting

There is a small window whereby ARS scan requests can schedule work that
userspace will miss when polling scrub_show. Hold the init_mutex lock
over calls to report the status to close this potential escape. Also,
make sure that requests to cancel the ARS workqueue are treated as an
idle event.

Cc: <stable@vger.kernel.org>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Fixes: 0c9e10914159 ("nfit, libnvdimm: allow an ARS scrub...")
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit/core.c