linux-uconsole/drivers/net
Ian Campbell 762965a2f4 xen: netback: read hotplug script once at start of day.
[ Upstream commit 31a418986a ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-22 16:55:51 -07:00
..
appletalk
arcnet arcnet: cleanup sizeof parameter 2013-08-11 18:35:25 -07:00
bonding bonding: Remove debug_fs files when module init fails 2014-05-30 21:52:14 -07:00
caif caif: CAIF_VIRTIO should depend on HAS_DMA 2013-05-11 16:28:24 -07:00
can can: add missing initialisations in CAN related skbuffs 2015-03-26 15:00:58 +01:00
cris
dsa
ethernet e1000: add dummy allocator to fix race condition between mtu change and netpoll 2015-05-06 21:56:28 +02:00
fddi
hamradio hamradio/yam: fix info leak in ioctl 2014-01-15 15:28:48 -08:00
hippi
hyperv hyperv: Fix a bug in netvsc_start_xmit() 2014-10-15 08:31:57 +02:00
ieee802154 ieee802154: fix error handling in ieee802154fake_probe() 2014-12-06 15:05:46 -08:00
irda net/irda: fix error return code in bfin_sir_open() 2013-05-08 13:13:29 -07:00
phy net: dp83640: fix broken calibration routine. 2015-06-22 16:55:51 -07:00
plip
ppp ppp: deflate: never return len larger than output buffer 2015-02-26 17:48:48 -08:00
slip
team team: don't traverse port list using rcu in team_set_mac_address 2015-03-18 13:22:27 +01:00
usb Revert "net: cx82310_eth: use common match macro" 2015-03-26 15:00:56 +01:00
vmxnet3 vmxnet3: fix building without CONFIG_PCI_MSI 2014-03-23 21:38:18 -07:00
wan wanxl: fix info leak in ioctl 2013-11-04 04:31:04 -08:00
wimax
wireless rtlwifi: rtl8192cu: Fix kernel deadlock 2015-06-05 23:20:00 -07:00
xen-netback xen: netback: read hotplug script once at start of day. 2015-06-22 16:55:51 -07:00
dummy.c dummy: fix oops when loading the dummy failed 2013-07-28 16:30:01 -07:00
eql.c
ifb.c ifb: fix oops when loading the ifb failed 2013-07-28 16:30:01 -07:00
Kconfig drivers/net: macvtap and tun depend on INET 2014-11-14 08:47:53 -08:00
LICENSE.SRC
loopback.c
macvlan.c macvlan: Initialize vlan_features to turn on offload support. 2014-08-14 09:24:15 +08:00
macvtap.c macvtap: make sure neighbour code can push ethernet header 2015-03-18 13:22:27 +01:00
Makefile
mdio.c
mii.c
netconsole.c
ntb_netdev.c ntb_netdev: remove from list on exit 2013-05-15 10:58:14 -07:00
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c tun: update file current position 2014-01-15 15:28:46 -08:00
veth.c net: vlan: announce STAG offload capability in some drivers 2013-04-19 14:46:06 -04:00
virtio_net.c virtio-net: alloc big buffers also when guest can receive UFO 2014-03-23 21:38:10 -07:00
vxlan.c inetpeer: get rid of ip_id_count 2014-08-14 09:24:15 +08:00
xen-netfront.c xen-netfront: Remove BUGs on paged skb data which crosses a page boundary 2014-12-16 09:09:42 -08:00