linux-stable/drivers
Keith Busch fa7f1bce27 nvme-pci: fix conflicting p2p resource adds
[ Upstream commit 9fe5c59ff6 ]

The nvme pci driver had been adding its CMB resource to the P2P DMA
subsystem everytime on on a controller reset. This results in the
following warning:

    ------------[ cut here ]------------
    nvme 0000:00:03.0: Conflicting mapping in same section
    WARNING: CPU: 7 PID: 81 at kernel/memremap.c:155 devm_memremap_pages+0xa6/0x380
    ...
    Call Trace:
     pci_p2pdma_add_resource+0x153/0x370
     nvme_reset_work+0x28c/0x17b1 [nvme]
     ? add_timer+0x107/0x1e0
     ? dequeue_entity+0x81/0x660
     ? dequeue_entity+0x3b0/0x660
     ? pick_next_task_fair+0xaf/0x610
     ? __switch_to+0xbc/0x410
     process_one_work+0x1cf/0x350
     worker_thread+0x215/0x3d0
     ? process_one_work+0x350/0x350
     kthread+0x107/0x120
     ? kthread_park+0x80/0x80
     ret_from_fork+0x1f/0x30
    ---[ end trace f7ea76ac6ee72727 ]---
    nvme nvme0: failed to register the CMB

This patch fixes this by registering the CMB with P2P only once.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-01 09:17:13 +01:00
..
accessibility
acpi mm/memory_hotplug: make add_memory() take the device_hotplug_lock 2019-12-01 09:17:10 +01:00
amba
android android: binder: no outgoing transaction when thread todo has transaction 2019-11-20 18:46:42 +01:00
ata ata: ep93xx: Use proper enums for directions 2019-11-24 08:20:10 +01:00
atm atm: zatm: Fix empty body Clang warnings 2019-12-01 09:16:41 +01:00
auxdisplay auxdisplay: panel: need to delete scan_timer when misc_register fails in panel_attach 2019-09-06 10:21:56 +02:00
base mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock 2019-12-01 09:17:10 +01:00
bcma
block amiflop: clean up on errors during setup 2019-12-01 09:16:25 +01:00
bluetooth Bluetooth: btrsi: fix bt tx timeout issue 2019-11-20 18:47:42 +01:00
bus bus: ti-sysc: Simplify cleanup upon failures in sysc_probe() 2019-09-21 07:16:51 +02:00
cdrom cdrom: don't attempt to fiddle with cdo->capability 2019-12-01 09:16:20 +01:00
char virtio_console: allocate inbufs in add_port() only if it is needed 2019-12-01 09:16:10 +01:00
clk clk: at91: audio-pll: fix audio pmc type 2019-12-01 09:16:31 +01:00
clocksource clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines 2019-11-24 08:19:57 +01:00
connector
cpufreq cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown 2019-10-29 09:20:08 +01:00
cpuidle cpuidle: menu: Fix wakeup statistics updates for polling state 2019-11-24 08:20:07 +01:00
crypto crypto: ccree - avoid implicit enum conversion 2019-12-01 09:16:28 +01:00
dax
dca
devfreq PM / devfreq: Fix static checker warning in try_then_request_governor 2019-11-24 08:21:07 +01:00
dio
dma dmaengine: rcar-dmac: set scatter/gather max segment size 2019-11-24 08:20:30 +01:00
dma-buf dma-buf/sw_sync: Synchronize signal vs syncpt free 2019-10-07 18:57:04 +02:00
edac EDAC, thunderx: Fix memory leak in thunderx_l2c_threaded_isr() 2019-12-01 09:16:18 +01:00
eisa
extcon extcon: cht-wc: Return from default case to avoid warnings 2019-11-20 18:45:26 +01:00
firewire
firmware gsmi: Fix bug in append_to_eventlog sysfs handler 2019-12-01 09:16:22 +01:00
fmc
fpga fpga: altera-ps-spi: Fix getting of optional confd gpio 2019-09-21 07:16:53 +02:00
fsi fsi: scom: Don't abort operations for minor errors 2019-09-06 10:22:19 +02:00
gnss
gpio gpio: max77620: Fixup debounce delays 2019-12-01 09:16:09 +01:00
gpu drm/i915/userptr: Try to acquire the page lock around set_page_dirty() 2019-12-01 09:16:12 +01:00
hid HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring() 2019-11-12 19:20:54 +01:00
hsi
hv vmbus: keep pointer to ring buffer page 2019-11-20 18:47:31 +01:00
hwmon hwmon: (npcm-750-pwm-fan) Change initial pwm target to 255 2019-11-24 08:21:01 +01:00
hwspinlock
hwtracing coresight: dynamic-replicator: Handle multiple connections 2019-11-20 18:47:29 +01:00
i2c i2c: uniphier-f: fix race condition when IRQ is cleared 2019-12-01 09:17:04 +01:00
ide
idle
iio iio: dac: mcp4922: fix error handling in mcp4922_write_raw 2019-11-20 18:45:21 +01:00
infiniband RDMA/bnxt_re: Avoid resource leak in case the NQ registration fails 2019-12-01 09:16:23 +01:00
input Input: silead - try firmware reload after unsuccessful resume 2019-11-24 08:20:28 +01:00
iommu iommu/arm-smmu-v3: Fix unexpected CMD_SYNC timeout 2019-11-24 08:19:30 +01:00
ipack
irqchip irqchip/irq-mvebu-icu: Fix wrong private data retrieval 2019-11-24 08:19:40 +01:00
isdn mISDN: Fix type of switch control variable in ctrl_teimanager 2019-12-01 09:16:55 +01:00
leds led: triggers: Fix a memory leak bug 2019-10-05 13:09:45 +02:00
lightnvm lightnvm: pblk: consider max hw sectors supported for max_write_pgs 2019-11-24 08:20:52 +01:00
macintosh macintosh/windfarm_smu_sat: Fix debug output 2019-12-01 09:16:37 +01:00
mailbox mbox: qcom: add APCS child device for QCS404 2019-10-07 18:57:02 +02:00
mcb
md dm raid: avoid bitmap with raid4/5/6 journal device 2019-12-01 09:16:39 +01:00
media media: venus: vdec: fix decoded data size 2019-11-24 08:20:49 +01:00
memory
memstick memstick: jmb38x_ms: Fix an error handling path in 'jmb38x_ms_probe()' 2019-10-29 09:20:07 +01:00
message
mfd mfd: max8997: Enale irq-wakeup unconditionally 2019-12-01 09:16:57 +01:00
misc misc: mic: fix a DMA pool free failure 2019-12-01 09:16:22 +01:00
mmc mmc: mediatek: fix cannot receive new request when msdc_cmd_is_ready fail 2019-12-01 09:16:21 +01:00
mtd mtd: devices: m25p80: Make sure WRITE_EN is issued before each write 2019-11-24 08:20:41 +01:00
mux
net ntb_netdev: fix sleep time mismatch 2019-12-01 09:17:13 +01:00
nfc NFC: st21nfca: fix double free 2019-11-12 19:20:30 +01:00
ntb ntb: intel: fix return value for ndev_vec_mask() 2019-12-01 09:17:13 +01:00
nubus
nvdimm libnvdimm/region: Initialize bad block for volatile namespaces 2019-10-11 18:21:20 +02:00
nvme nvme-pci: fix conflicting p2p resource adds 2019-12-01 09:17:13 +01:00
nvmem nvmem: core: return error code instead of NULL from nvmem_device_get 2019-11-20 18:46:31 +01:00
of of/unittest: Fix I2C bus unit-address error 2019-11-20 18:47:00 +01:00
opp OPP: Return error on error from dev_pm_opp_get_opp_count() 2019-11-24 08:20:06 +01:00
oprofile
parisc parisc: Disable HP HSC-PCI Cards to prevent kernel crash 2019-10-05 13:10:04 +02:00
parport
pci PCI: vmd: Detach resources after stopping root bus 2019-12-01 09:16:37 +01:00
pcmcia
perf
phy phy: lantiq: Fix compile warning 2019-11-20 18:47:35 +01:00
pinctrl pinctrl: sunxi: Fix a memory leak in 'sunxi_pinctrl_build_state()' 2019-12-01 09:16:24 +01:00
platform ACPI / scan: Create platform device for INT33FE ACPI nodes 2019-12-01 09:16:35 +01:00
pnp
power power: supply: twl4030_charger: disable eoc interrupt on linear charge 2019-11-20 18:47:01 +01:00
powercap
pps
ps3
ptp
pwm pwm: lpss: Only set update bit if we are actually changing the settings 2019-12-01 09:16:24 +01:00
rapidio
ras
regulator regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized 2019-11-10 11:27:15 +01:00
remoteproc remoteproc: qcom: q6v5: Fix a race condition on fatal crash 2019-11-24 08:20:29 +01:00
reset reset: Fix potential use-after-free in __of_reset_control_get() 2019-11-24 08:20:38 +01:00
rpmsg rpmsg: glink: smem: Support rx peak for size less than 4 bytes 2019-11-24 08:20:05 +01:00
rtc rtc: s35390a: Change buf's type to u8 in s35390a_init 2019-12-01 09:16:52 +01:00
s390 s390/kasan: avoid instrumentation of early C code 2019-11-24 08:20:44 +01:00
sbus
scsi scsi: hisi_sas: Fix NULL pointer dereference 2019-12-01 09:16:44 +01:00
sfi
sh
siox
slimbus silmbus: ngd: register controller after power up. 2019-11-20 18:47:30 +01:00
sn
soc soc: fsl: bman_portals: defer probe after bman's probe 2019-11-24 08:20:28 +01:00
soundwire soundwire: intel: Fix uninitialized adev deref 2019-11-20 18:45:22 +01:00
spi spi: omap2-mcspi: Set FIFO DMA trigger level to word length 2019-12-01 09:16:43 +01:00
spmi
ssb
staging media: imx: work around false-positive warning, again 2019-11-20 18:47:16 +01:00
target scsi: target: core: Do not overwrite CDB byte 1 2019-11-10 11:27:28 +01:00
tc
tee tee: optee: add missing of_node_put after of_device_is_available 2019-11-24 08:19:08 +01:00
thermal thermal: rcar_thermal: Prevent hardware access during system suspend 2019-12-01 09:17:00 +01:00
thunderbolt thunderbolt: Use 32-bit writes when writing ring producer/consumer 2019-11-06 13:06:12 +01:00
tty synclink_gt(): fix compat_ioctl() 2019-12-01 09:16:16 +01:00
uio vmbus: keep pointer to ring buffer page 2019-11-20 18:47:31 +01:00
usb USB: misc: appledisplay: fix backlight update_status return code 2019-12-01 09:16:37 +01:00
uwb
vfio vfio/pci: Mask buggy SR-IOV VF INTx support 2019-11-20 18:47:32 +01:00
vhost vhost/vsock: split packets to send using multiple buffers 2019-12-01 09:16:08 +01:00
video backlight: lm3639: Unconditionally call led_classdev_unregister 2019-11-24 08:20:45 +01:00
virt virt: vbox: fix memory leak in hgcm_call_preprocess_linaddr 2019-11-06 13:06:04 +01:00
virtio
visorbus
vlynq
vme
w1 w1: IAD Register is yet readable trough iad sys file. Fix snprintf (%u for unsigned, count for max size). 2019-12-01 09:16:22 +01:00
watchdog watchdog: w83627hf_wdt: Support NCT6796D, NCT6797D, NCT6798D 2019-11-24 08:19:43 +01:00
xen mm/memory_hotplug: make add_memory() take the device_hotplug_lock 2019-12-01 09:17:10 +01:00
zorro
Kconfig
Makefile