Revision e2e004acc7cbe3c531e752a270a74e95cde3ea48 authored by Ross Lagerwall on 08 February 2017, 10:57:37 UTC, committed by David S. Miller on 09 February 2017, 21:43:01 UTC
This fixes a crash when running out of grant refs when creating many
queues across many netdevs.

* If creating queues fails (i.e. there are no grant refs available),
call xenbus_dev_fatal() to ensure that the xenbus device is set to the
closed state.
* If no queues are created, don't call xennet_disconnect_backend as
netdev->real_num_tx_queues will not have been set correctly.
* If setup_netfront() fails, ensure that all the queues created are
cleaned up, not just those that have been set up.
* If any queues were set up and an error occurs, call
xennet_destroy_queues() to clean up the napi context.
* If any fatal error occurs, unregister and destroy the netdev to avoid
leaving around a half setup network device.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1b5805c
History
File Mode Size
partitions
Kconfig -rw-r--r-- 4.9 KB
Kconfig.iosched -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 1.0 KB
badblocks.c -rw-r--r-- 14.5 KB
bio-integrity.c -rw-r--r-- 14.3 KB
bio.c -rw-r--r-- 49.9 KB
blk-cgroup.c -rw-r--r-- 35.8 KB
blk-core.c -rw-r--r-- 92.3 KB
blk-exec.c -rw-r--r-- 3.2 KB
blk-flush.c -rw-r--r-- 16.4 KB
blk-integrity.c -rw-r--r-- 12.3 KB
blk-ioc.c -rw-r--r-- 10.2 KB
blk-lib.c -rw-r--r-- 9.9 KB
blk-map.c -rw-r--r-- 5.9 KB
blk-merge.c -rw-r--r-- 19.4 KB
blk-mq-cpumap.c -rw-r--r-- 2.3 KB
blk-mq-pci.c -rw-r--r-- 1.5 KB
blk-mq-sysfs.c -rw-r--r-- 12.9 KB
blk-mq-tag.c -rw-r--r-- 11.1 KB
blk-mq-tag.h -rw-r--r-- 2.2 KB
blk-mq.c -rw-r--r-- 63.7 KB
blk-mq.h -rw-r--r-- 2.9 KB
blk-settings.c -rw-r--r-- 28.2 KB
blk-softirq.c -rw-r--r-- 4.3 KB
blk-stat.c -rw-r--r-- 5.9 KB
blk-stat.h -rw-r--r-- 1.1 KB
blk-sysfs.c -rw-r--r-- 22.6 KB
blk-tag.c -rw-r--r-- 10.0 KB
blk-throttle.c -rw-r--r-- 42.7 KB
blk-timeout.c -rw-r--r-- 5.9 KB
blk-wbt.c -rw-r--r-- 17.6 KB
blk-wbt.h -rw-r--r-- 3.9 KB
blk-zoned.c -rw-r--r-- 7.6 KB
blk.h -rw-r--r-- 9.0 KB
bounce.c -rw-r--r-- 5.8 KB
bsg-lib.c -rw-r--r-- 6.4 KB
bsg.c -rw-r--r-- 22.9 KB
cfq-iosched.c -rw-r--r-- 127.1 KB
cmdline-parser.c -rw-r--r-- 4.9 KB
compat_ioctl.c -rw-r--r-- 20.8 KB
deadline-iosched.c -rw-r--r-- 11.3 KB
elevator.c -rw-r--r-- 23.7 KB
genhd.c -rw-r--r-- 45.0 KB
ioctl.c -rw-r--r-- 15.1 KB
ioprio.c -rw-r--r-- 5.1 KB
noop-iosched.c -rw-r--r-- 2.6 KB
partition-generic.c -rw-r--r-- 16.6 KB
scsi_ioctl.c -rw-r--r-- 19.5 KB
t10-pi.c -rw-r--r-- 4.8 KB

back to top