linux-stable/drivers/dax
Dan Williams a455aa72f7 device-dax/kmem: fix resource release
The conversion to request_mem_region() is broken because it assumes that
the range is marked busy prior to release.  However, due to the way that
the kmem driver manipulates the IORESOURCE_BUSY flag (clears it to let
{add,remove}_memory() handle busy) it requires a manual release_resource()
to perform cleanup.

Given that the actual 'struct resource *' needs to be recalled, not just
the range, add that tracking to the kmem driver-data.

Fixes: 0513bd5bb1 ("device-dax/kmem: replace release_resource() with release_mem_region()")
Reported-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: Brice Goglin <Brice.Goglin@inria.fr>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Jia He <justin.he@arm.com>
Cc: Joao Martins <joao.m.martins@oracle.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lkml.kernel.org/r/160272252925.3136502.17220638073995895400.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-10-16 11:11:14 -07:00
..
hmem dax/hmem: introduce dax_hmem.region_idle parameter 2020-10-13 18:38:28 -07:00
pmem mm/memremap_pages: convert to 'struct range' 2020-10-13 18:38:28 -07:00
bus.c device-dax: add a range mapping allocation attribute 2020-10-13 18:38:29 -07:00
bus.h mm/memremap_pages: convert to 'struct range' 2020-10-13 18:38:28 -07:00
dax-private.h device-dax: add an 'align' attribute 2020-10-13 18:38:28 -07:00
device.c device-dax: make align a per-device property 2020-10-13 18:38:28 -07:00
Kconfig ACPI: HMAT: attach a device for each soft-reserved range 2020-10-13 18:38:28 -07:00
kmem.c device-dax/kmem: fix resource release 2020-10-16 11:11:14 -07:00
Makefile ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device 2020-10-13 18:38:27 -07:00
super.c dax: Fix stack overflow when mounting fsdax pmem device 2020-09-20 08:57:36 -07:00