linux/drivers
Ian Campbell 31a418986a xen: netback: read hotplug script once at start of day.
When we come to tear things down in netback_remove() and generate the
uevent it is possible that the xenstore directory has already been
removed (details below).

In such cases netback_uevent() won't be able to read the hotplug
script and will write a xenstore error node.

A recent change to the hypervisor exposed this race such that we now
sometimes lose it (where apparently we didn't ever before).

Instead read the hotplug script configuration during setup and use it
for the lifetime of the backend device.

The apparently more obvious fix of moving the transition to
state=Closed in netback_remove() to after the uevent does not work
because it is possible that we are already in state=Closed (in
reaction to the guest having disconnected as it shutdown). Being
already in Closed means the toolstack is at liberty to start tearing
down the xenstore directories. In principal it might be possible to
arrange to unregister the device sooner (e.g on transition to Closing)
such that xenstore would still be there but this state machine is
fragile and prone to anger...

A modern Xen system only relies on the hotplug uevent for driver
domains, when the backend is in the same domain as the toolstack it
will run the necessary setup/teardown directly in the correct sequence
wrt xenstore changes.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-01 12:03:04 -07:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus
cdrom
char
clk
clocksource
connector
cpufreq
cpuidle
crypto
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
gpio
gpu Merge branch 'drm-fixes-4.1' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 2015-05-22 13:31:54 +10:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2015-05-21 17:23:11 -07:00
hsi
hv
hwmon
hwspinlock
hwtracing/coresight
i2c
ide
idle
iio
infiniband IB/cma: Fix broken AF_IB UD support 2015-05-20 16:15:56 -04:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2015-05-22 14:49:55 -07:00
iommu
ipack
irqchip irqchip/gicv3-its: ITS table size should not be smaller than PSZ 2015-05-20 22:13:37 +02:00
isdn
leds
lguest lguest: fix out-by-one error in address checking. 2015-05-27 09:57:21 -07:00
macintosh
mailbox
mcb
md md fixes for 4.1-rc4 2015-05-22 15:10:07 -07:00
media
memory
memstick
message
mfd mfd: da9052: Fix broken regulator probe 2015-05-27 13:34:15 +01:00
misc
mmc mmc: atmel-mci: fix bad variable type for clkdiv 2015-05-18 09:04:42 +02:00
mtd Two MTD fixes for 4.1: 2015-05-18 10:01:54 -07:00
net xen: netback: read hotplug script once at start of day. 2015-06-01 12:03:04 -07:00
nfc
ntb
nubus
of
oprofile
parisc
parport
pci
pcmcia
phy
pinctrl pinctrl: Fix gpio/pin mapping for Meson8b 2015-05-19 11:40:52 +02:00
platform
pnp
power
powercap
pps
ps3
ptp
pwm pwm: img: Impose upper and lower timebase steps value 2015-05-19 16:07:40 +02:00
rapidio
ras
regulator mfd: da9052: Fix broken regulator probe 2015-05-27 13:34:15 +01:00
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi MAINTAINERS, be2iscsi: change email domain 2015-05-18 11:34:52 -07:00
sfi
sh
sn
soc
spi
spmi
ssb ssb: extend fix for PCI related silent reboots to all chipsets 2015-05-20 16:36:06 +03:00
staging Staging / IIO driver fixes for 4.1-rc4 2015-05-16 21:04:56 -07:00
target
tc
thermal Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal into for-rc 2015-05-19 08:12:27 +08:00
thunderbolt
tty xen: bug fixes for 4.1-rc4 2015-05-21 20:19:38 -07:00
uio
usb
uwb
vfio
vhost
video backlight: pwm: Handle EPROBE_DEFER while requesting the PWM 2015-05-26 08:44:59 +01:00
virt
virtio
vlynq
vme
w1
watchdog
xen xen/events: don't bind non-percpu VIRQs with percpu chip 2015-05-19 19:55:36 +01:00
zorro
Kconfig
Makefile