WSL2-Linux-Kernel/drivers
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
..
accessibility
acpi dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
amba
android binder: fix UAF when releasing todo list 2020-10-10 12:40:52 +02:00
ata
atm
auxdisplay
base dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
bcma
block drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
bluetooth
bus Char/Misc driver patches for 5.10-rc1 2020-10-15 10:01:51 -07:00
cdrom
char drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
clk
clocksource hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
connector
counter
cpufreq cpufreq: stats: Fix string format specifier mismatch 2020-10-12 12:32:10 +02:00
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-10-13 08:50:16 -07:00
dax device-dax/kmem: fix resource release 2020-10-16 11:11:14 -07:00
dca
devfreq
dio
dma
dma-buf dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
edac EFI changes for v5.10: 2020-10-12 13:26:49 -07:00
eisa
extcon
firewire
firmware USB/PHY/Thunderbolt driver patches for 5.10-rc1 2020-10-15 09:51:18 -07:00
fpga
fsi
gnss
gpio - New Drivers 2020-10-14 15:56:58 -07:00
gpu dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2020-10-15 15:11:56 -07:00
hsi
hv hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
hwmon Driver Core patches for 5.10-rc1 2020-10-14 16:09:32 -07:00
hwspinlock
hwtracing
i2c i2c: owl: Clear NACK and BUS error bits 2020-10-10 13:15:46 +02:00
i3c
ide block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
idle
iio sound updates for 5.10 2020-10-15 11:07:44 -07:00
infiniband block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
input hyperv-next for 5.10 2020-10-14 10:32:10 -07:00
interconnect
iommu dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
ipack
irqchip - New Drivers 2020-10-14 15:56:58 -07:00
isdn
leds
lightnvm
macintosh
mailbox
mcb
md - Improve DM core's bio splitting to use blk_max_size_offset(). Also 2020-10-14 15:05:38 -07:00
media dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
memory IOMMU Updates for Linux v5.10 2020-10-14 12:08:34 -07:00
memstick
message SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
mfd - New Drivers 2020-10-14 15:56:58 -07:00
misc dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
mmc block-5.10-2020-10-12 2020-10-13 12:12:44 -07:00
most
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2020-10-15 15:11:56 -07:00
mux
net dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
nfc
ntb
nubus
nvdimm mm/memremap_pages: support multiple ranges per invocation 2020-10-13 18:38:28 -07:00
nvme drivers-5.10-2020-10-12 2020-10-13 13:04:41 -07:00
nvmem
of dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
opp
oprofile
parisc
parport
pci dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
pcmcia
perf
phy drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
pinctrl Pin control bulk changes for the v5.10 kernel cycle 2020-10-14 15:25:04 -07:00
platform platform-drivers-x86 for v5.10-1 2020-10-14 10:43:24 -07:00
pnp
power Char/Misc driver patches for 5.10-rc1 2020-10-15 10:01:51 -07:00
powercap
pps
ps3
ptp
pwm drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
rapidio
ras
regulator
remoteproc dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
reset
rpmsg
rtc
s390 SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
sbus
scsi dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
sfi
sh
siox
slimbus
soc Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
soundwire
spi sound updates for 5.10 2020-10-15 11:07:44 -07:00
spmi
ssb
staging dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
target SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
tc
tee
thermal
thunderbolt
tty
uio
usb dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
vdpa dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
vfio
vhost
video drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
virt
virtio drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
visorbus
vlynq
vme
w1
watchdog - New Drivers 2020-10-14 15:56:58 -07:00
xen dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
zorro
Kconfig
Makefile