OpenCloudOS-Kernel/drivers/nvdimm
Vishal Verma 0930a750c3 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: <linux-acpi@vger.kernel.org>
Cc: <linux-nvdimm@lists.01.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Robert Moore <robert.moore@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2017-08-31 15:05:10 -07:00
..
Kconfig pmem: add dax_operations support 2017-04-19 15:14:35 -07:00
Makefile libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
blk.c block: guard bvec iteration logic 2017-07-03 16:56:26 -06:00
btt.c libnvdimm, btt: cache sector_size in arena_info 2017-08-31 15:05:10 -07:00
btt.h libnvdimm, btt: cache sector_size in arena_info 2017-08-31 15:05:10 -07:00
btt_devs.c libnvdimm: rename nd_sector_size_{show,store} to nd_size_select_{show,store} 2017-08-11 17:36:54 -07:00
bus.c libnvdimm: fix potential deadlock while clearing errors 2017-08-31 15:05:10 -07:00
claim.c libnvdimm, btt: fix a missed NVDIMM_IO_ATOMIC case in the write path 2017-08-31 14:31:38 -07:00
core.c libnvdimm: rename nd_sector_size_{show,store} to nd_size_select_{show,store} 2017-08-11 17:36:54 -07:00
dax_devs.c Merge branch 'for-4.13/dax' into libnvdimm-for-next 2017-07-03 16:54:58 -07:00
dimm.c libnvdimm: handle locked label storage areas 2017-05-04 15:41:39 -07:00
dimm_devs.c libnvdimm, nfit: enable support for volatile ranges 2017-06-27 16:44:13 -07:00
e820.c libnvdimm, e820: use module_platform_driver 2016-12-05 08:52:21 -08:00
label.c libnvdimm, label: fix index block size calculation 2017-08-29 18:28:18 -07:00
label.h libnvdimm, btt: BTT updates for UEFI 2.7 format 2017-06-29 13:50:38 -07:00
namespace_devs.c libnvdimm: rename nd_sector_size_{show,store} to nd_size_select_{show,store} 2017-08-11 17:36:54 -07:00
nd-core.h libnvdimm, nfit: enable support for volatile ranges 2017-06-27 16:44:13 -07:00
nd.h libnvdimm, label: fix index block size calculation 2017-08-29 18:28:18 -07:00
pfn.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pfn_devs.c libnvdimm, pfn, dax: limit namespace alignments to the supported set 2017-08-15 09:32:12 -07:00
pmem.c libnvdimm for 4.13 2017-07-07 09:44:06 -07:00
pmem.h Merge branch 'for-4.13/dax' into libnvdimm-for-next 2017-07-03 16:54:58 -07:00
region.c libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime 2017-06-30 18:56:03 -07:00
region_devs.c nfit, libnvdimm, region: export 'position' in mapping info 2017-08-04 17:20:16 -07:00