android_kernel_oneplus_msm8998/drivers
Eduardo Otubo 49f1a164d4 xen-netfront: remove warning when unloading module
[ Upstream commit 5b5971df3bc2775107ddad164018a8a8db633b81 ]

v2:
 * Replace busy wait with wait_event()/wake_up_all()
 * Cannot garantee that at the time xennet_remove is called, the
   xen_netback state will not be XenbusStateClosed, so added a
   condition for that
 * There's a small chance for the xen_netback state is
   XenbusStateUnknown by the time the xen_netfront switches to Closed,
   so added a condition for that.

When unloading module xen_netfront from guest, dmesg would output
warning messages like below:

  [  105.236836] xen:grant_table: WARNING: g.e. 0x903 still in use!
  [  105.236839] deferring g.e. 0x903 (pfn 0x35805)

This problem relies on netfront and netback being out of sync. By the time
netfront revokes the g.e.'s netback didn't have enough time to free all of
them, hence displaying the warnings on dmesg.

The trick here is to make netfront to wait until netback frees all the g.e.'s
and only then continue to cleanup for the module removal, and this is done by
manipulating both device states.

Signed-off-by: Eduardo Otubo <otubo@redhat.com>
Acked-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-03 17:04:28 +01:00
..
accessibility
acpi ACPI / bus: Leave modalias empty for devices which are not present 2018-02-03 17:04:27 +01:00
amba
android ANDROID: binder: fix proc->tsk check. 2017-08-30 10:19:26 +02:00
ata libata: apply MAX_SEC_1024 to all LITEON EP1 series devices 2018-01-23 19:50:16 +01:00
atm atm: horizon: Fix irq release error 2017-12-16 10:33:55 +01:00
auxdisplay
base drivers: base: cacheinfo: fix boot error message when acpi is enabled 2018-01-31 12:06:08 +01:00
bcma bcma: use (get|put)_device when probing/removing device driver 2017-03-12 06:37:30 +01:00
block loop: fix concurrent lo_open/lo_release 2018-02-03 17:04:24 +01:00
bluetooth Revert "Bluetooth: btusb: driver to enable the usb-wakeup feature" 2017-12-25 14:22:15 +01:00
bus sunxi-rsb: Include OF based modalias in device uevent 2018-01-10 09:27:09 +01:00
cdrom
char hwrng: core - sleep interruptible in read 2018-01-17 09:35:28 +01:00
clk clk: tegra: Fix cclk_lp divisor register 2017-12-20 10:04:59 +01:00
clocksource clockevents/drivers/cs5535: Improve resilience to spurious interrupts 2017-10-27 10:23:17 +02:00
connector
cpufreq cpufreq: Add Loongson machine dependencies 2018-02-03 17:04:27 +01:00
cpuidle cpuidle: fix broadcast control when broadcast can not be entered 2017-12-25 14:22:15 +01:00
crypto crypto: n2 - cure use after free 2018-01-10 09:27:08 +01:00
dca
devfreq
dio
dma dmaengine: ti-dma-crossbar: Correct am335x/am43xx mux value type 2017-12-20 10:04:58 +01:00
dma-buf
edac EDAC, i5000, i5400: Fix definition of NRECMEMB register 2017-12-16 10:33:54 +01:00
eisa
extcon extcon: palmas: Check the parent instance to prevent the NULL 2017-11-21 09:21:18 +01:00
firewire firewire: net: fix fragmented datagram_size off-by-one 2016-11-10 16:36:35 +01:00
firmware efi/esrt: Cleanup bad memory map log messages 2017-12-20 10:04:56 +01:00
fmc
fpga
gpio gpio: ath79: add missing MODULE_DESCRIPTION/LICENSE 2018-02-03 17:04:26 +01:00
gpu drm/amdkfd: Fix SDMA oversubsription handling 2018-02-03 17:04:27 +01:00
hid HID: xinmo: fix for out of range for THT 2P arcade controller. 2017-12-25 14:22:12 +01:00
hsi
hv x86/retpoline/hyperv: Convert assembler indirect jumps 2018-01-23 19:50:13 +01:00
hwmon hwmon: (asus_atk0110) fix uninitialized data access 2017-12-25 14:22:12 +01:00
hwspinlock
hwtracing intel_th: pci: Add Gemini Lake support 2017-12-20 10:04:54 +01:00
i2c i2c: riic: fix restart condition 2017-12-16 10:33:53 +01:00
ide
idle intel_idle: Support for Intel Xeon Phi Processor x200 Product Family 2016-09-15 08:27:46 +02:00
iio iio: light: fix improper return value 2017-11-30 08:37:27 +00:00
infiniband IB/srpt: Disable RDMA access by the initiator 2018-01-17 09:35:24 +01:00
input Input: trackpoint - force 3 buttons if 0 button is reported 2018-01-31 12:06:11 +01:00
iommu iommu/arm-smmu-v3: Don't free page table ops twice 2018-01-17 09:35:25 +01:00
ipack
irqchip irqchip/crossbar: Fix incorrect type of register size 2017-12-16 10:33:52 +01:00
isdn isdn: kcapi: avoid uninitialized data 2017-12-25 14:22:13 +01:00
leds leds: ktd2692: avoid harmless maybe-uninitialized warning 2017-05-14 13:32:55 +02:00
lguest
lightnvm lightnvm: put bio before return 2016-09-24 10:07:35 +02:00
macintosh
mailbox mailbox: handle empty message in tx_tick 2017-08-06 19:19:41 -07:00
mcb mcb: Fixed bar number assignment for the gdd 2016-06-01 12:15:53 -07:00
md bcache: check return value of register_shrinker 2018-02-03 17:04:27 +01:00
media usbvision fix overflow of interfaces array 2018-01-17 09:35:27 +01:00
memory ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure 2017-12-16 10:33:51 +01:00
memstick memstick: rtsx_usb_ms: Manage runtime PM when accessing the device 2016-10-28 03:01:35 -04:00
message
mfd mfd: twl6040: Fix child-node lookup 2018-01-02 20:33:20 +01:00
misc cxl: Check if vphb exists before iterating over AFU devices 2017-12-25 14:22:08 +01:00
mmc mmc: sdhci-of-esdhc: add/remove some quirks according to vendor version 2018-01-31 12:06:09 +01:00
mtd mtd: nand: denali_pci: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2018-02-03 17:04:26 +01:00
net xen-netfront: remove warning when unloading module 2018-02-03 17:04:28 +01:00
nfc nfc: fdp: fix NULL pointer dereference 2017-08-06 19:19:40 -07:00
ntb ntb_transport: fix bug calculating num_qps_mw 2017-08-30 10:19:29 +02:00
nubus
nvdimm libnvdimm, namespace: make 'resource' attribute only readable by root 2017-11-30 08:37:23 +00:00
nvme nvme: Fix memory order on async queue deletion 2017-11-24 08:32:25 +01:00
nvmem nvmem: imx-ocotp: Fix wrong register size 2017-08-06 19:19:46 -07:00
of of: device: Export of_device_{get_modalias, uvent_modalias} to modules 2017-07-27 15:06:09 -07:00
oprofile
parisc parisc: Hide Diva-built-in serial aux and graphics card 2018-01-02 20:33:20 +01:00
parport parisc, parport_gsc: Fixes for printk continuation lines 2017-06-17 06:39:37 +02:00
pci PCI: layerscape: Fix MSG TLP drop setting 2018-01-31 12:06:08 +01:00
pcmcia
perf drivers/perf: arm_pmu: Fix leak in error path 2016-10-07 15:23:41 +02:00
phy phy: work around 'phys' references to usb-nop-xceiv devices 2018-01-23 19:50:16 +01:00
pinctrl pinctrl: st: add irq_request/release_resources callbacks 2017-12-25 14:22:11 +01:00
platform platform/x86: hp-wmi: Do not shadow error values 2017-11-15 17:13:11 +01:00
pnp PNP: Add Broadwell to Intel MCH size workaround 2016-08-16 09:30:48 +02:00
power power: reset: zx-reboot: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE 2018-02-03 17:04:25 +01:00
powercap
pps pps: do not crash when failed to register 2016-08-10 11:49:25 +02:00
ps3
ptp
pwm pwm: pca9685: Fix period change with same duty cycle 2017-03-15 09:57:14 +08:00
rapidio
ras
regulator regulator: fan53555: fix I2C device ids 2017-11-02 09:40:50 +01:00
remoteproc remoteproc: Fix potential race condition in rproc_add 2016-08-20 18:09:20 +02:00
reset
rpmsg
rtc rtc: set the alarm to the next expiring timer 2017-12-25 14:22:15 +01:00
s390 s390/qeth: no ETH header for outbound AF_IUCV 2017-12-25 14:22:12 +01:00
sbus
scsi scsi: libiscsi: fix shifting of DID_REQUEUE host byte 2018-01-31 12:06:11 +01:00
sfi
sh
sn
soc soc: qcom/spm: shut up uninitialized variable warning 2016-09-24 10:07:42 +02:00
spi spi: xilinx: Detect stall with Unknown commands 2018-01-02 20:33:21 +01:00
spmi spmi: Include OF based modalias in device uevent 2017-07-27 15:06:10 -07:00
ssb ssb: Fix error routine when fallback SPROM fails 2017-01-09 08:07:42 +01:00
staging staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl 2018-01-17 09:35:32 +01:00
target target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2018-01-17 09:35:31 +01:00
tc
thermal thermal: hisilicon: Handle return value of clk_prepare_enable 2017-12-25 14:22:15 +01:00
thunderbolt thunderbolt: Fix double free of drom buffer 2016-06-01 12:15:53 -07:00
tty sysrq: Fix warning in sysrq generated crash. 2018-01-17 09:35:28 +01:00
uio uio: fix dmem_region_start computation 2016-10-31 04:13:59 -06:00
usb usbip: prevent leaking socket pointer address in messages 2018-01-31 12:06:12 +01:00
uwb uwb: ensure that endpoint is interrupt 2017-10-12 11:27:35 +02:00
vfio vfio-pci: Handle error from pci_iomap 2017-08-06 19:19:46 -07:00
vhost fix a page leak in vhost_scsi_iov_to_sgl() error recovery 2017-11-30 08:37:22 +00:00
video backlight: pwm_bl: Fix overflow condition 2017-12-25 14:22:13 +01:00
virt
virtio virtio: release virtio index when fail to device_register 2017-12-16 10:33:48 +01:00
vlynq
vme vme: Fix wrong pointer utilization in ca91cx42_slave_get 2017-01-19 20:17:21 +01:00
w1 w1: ds2490: USB transfer buffers need to be DMAable 2017-03-12 06:37:29 +01:00
watchdog watchdog: kempld: fix gcc-4.3 build 2017-10-21 17:09:04 +02:00
xen xen: xenbus driver must not accept invalid transaction ids 2017-11-30 08:37:28 +00:00
zorro
Kconfig
Makefile usb: Make sure usb/phy/of gets built-in 2017-05-20 14:26:59 +02:00