Skip to content
Commit 33cc2c96 authored by Dan Williams's avatar Dan Williams
Browse files

acpi, nfit: Fix scrub idle detection



The notification of scrub completion happens within the scrub workqueue.
That can clearly race someone running scrub_show() and work_busy()
before the workqueue has a chance to flush the recently completed work.
Add a flag to reliably indicate the idle vs busy state. Without this
change applications using poll(2) to wait for scrub-completion may
falsely wakeup and read ARS as being busy even though the thread is
going idle and then hang indefinitely.

Fixes: bc6ba808 ("nfit, address-range-scrub: rework and simplify ARS...")
Cc: <stable@vger.kernel.org>
Reported-by: default avatarVishal Verma <vishal.l.verma@intel.com>
Tested-by: default avatarVishal Verma <vishal.l.verma@intel.com>
Reported-by: default avatarLukasz Dorau <lukasz.dorau@intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 1273c253
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment