aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorVishal Verma <[email protected]>2017-08-30 19:36:02 -0600
committerDan Williams <[email protected]>2017-08-31 15:05:10 -0700
commit0930a750c35be3c2f5aacebc0d20ddeaf727c208 (patch)
tree9fdf04c2bea121e8d9405e816d1cadfef4389b8c /lib/memory-notifier-error-inject.c
parent75892004508260df72ed3d319f10d2acd516220e (diff)
libnvdimm: fix potential deadlock while clearing errors
With the ACPI NFIT 'DSM' methods, acpi can be called from IO paths. Specifically, the DSM to clear media errors is called during writes, so that we can provide a writes-fix-errors model. However it is easy to imagine a scenario like: -> write through the nvdimm driver -> acpi allocation -> writeback, causes more IO through the nvdimm driver -> deadlock Fix this by using memalloc_noio_{save,restore}, which sets the GFP_NOIO flag for the current scope when issuing commands/IOs that are expected to clear errors. Cc: <[email protected]> Cc: <[email protected]> Cc: Dan Williams <[email protected]> Cc: Robert Moore <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Signed-off-by: Vishal Verma <[email protected]> Signed-off-by: Dan Williams <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions