Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'stable/for-linus-3.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull Xen fixes from Konrad Rzeszutek Wilk:
- Three fixes for ARM/ARM64 to either compile or not certain generic
drivers
- Fix for avoiding a potential deadlock when an user space event
channel is destroyed.
- Fix a workqueue resuming multiple times.

* tag 'stable/for-linus-3.11-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/tmem: do not allow XEN_TMEM on ARM64
xen/evtchn: avoid a deadlock when unbinding an event channel
xen/arm: enable PV control for ARM
xen/arm64: Don't compile cpu hotplug
xenbus: frontend resume cleanup

+21 -26
+1 -1
drivers/xen/Kconfig
··· 145 145 146 146 config XEN_TMEM 147 147 tristate 148 - depends on !ARM 148 + depends on !ARM && !ARM64 149 149 default m if (CLEANCACHE || FRONTSWAP) 150 150 help 151 151 Shim to interface in-kernel Transcendent Memory hooks
+2 -3
drivers/xen/Makefile
··· 1 - ifneq ($(CONFIG_ARM),y) 2 - obj-y += manage.o 1 + ifeq ($(filter y, $(CONFIG_ARM) $(CONFIG_ARM64)),) 3 2 obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o 4 3 endif 5 4 obj-$(CONFIG_X86) += fallback.o 6 - obj-y += grant-table.o features.o events.o balloon.o 5 + obj-y += grant-table.o features.o events.o balloon.o manage.o 7 6 obj-y += xenbus/ 8 7 9 8 nostackp := $(call cc-option, -fno-stack-protector)
+2 -19
drivers/xen/evtchn.c
··· 379 379 if (unbind.port >= NR_EVENT_CHANNELS) 380 380 break; 381 381 382 - spin_lock_irq(&port_user_lock); 383 - 384 382 rc = -ENOTCONN; 385 - if (get_port_user(unbind.port) != u) { 386 - spin_unlock_irq(&port_user_lock); 383 + if (get_port_user(unbind.port) != u) 387 384 break; 388 - } 389 385 390 386 disable_irq(irq_from_evtchn(unbind.port)); 391 - 392 - spin_unlock_irq(&port_user_lock); 393 387 394 388 evtchn_unbind_from_user(u, unbind.port); 395 389 ··· 484 490 int i; 485 491 struct per_user_data *u = filp->private_data; 486 492 487 - spin_lock_irq(&port_user_lock); 488 - 489 - free_page((unsigned long)u->ring); 490 - 491 493 for (i = 0; i < NR_EVENT_CHANNELS; i++) { 492 494 if (get_port_user(i) != u) 493 495 continue; 494 496 495 497 disable_irq(irq_from_evtchn(i)); 496 - } 497 - 498 - spin_unlock_irq(&port_user_lock); 499 - 500 - for (i = 0; i < NR_EVENT_CHANNELS; i++) { 501 - if (get_port_user(i) != u) 502 - continue; 503 - 504 498 evtchn_unbind_from_user(get_port_user(i), i); 505 499 } 506 500 501 + free_page((unsigned long)u->ring); 507 502 kfree(u->name); 508 503 kfree(u); 509 504
+16 -3
drivers/xen/xenbus/xenbus_probe_frontend.c
··· 115 115 return -EFAULT; 116 116 } 117 117 118 - INIT_WORK(&xdev->work, xenbus_frontend_delayed_resume); 119 118 queue_work(xenbus_frontend_wq, &xdev->work); 120 119 121 120 return 0; 122 121 } 123 122 124 123 return xenbus_dev_resume(dev); 124 + } 125 + 126 + static int xenbus_frontend_dev_probe(struct device *dev) 127 + { 128 + if (xen_store_domain_type == XS_LOCAL) { 129 + struct xenbus_device *xdev = to_xenbus_device(dev); 130 + INIT_WORK(&xdev->work, xenbus_frontend_delayed_resume); 131 + } 132 + 133 + return xenbus_dev_probe(dev); 125 134 } 126 135 127 136 static const struct dev_pm_ops xenbus_pm_ops = { ··· 151 142 .name = "xen", 152 143 .match = xenbus_match, 153 144 .uevent = xenbus_uevent_frontend, 154 - .probe = xenbus_dev_probe, 145 + .probe = xenbus_frontend_dev_probe, 155 146 .remove = xenbus_dev_remove, 156 147 .shutdown = xenbus_dev_shutdown, 157 148 .dev_attrs = xenbus_dev_attrs, ··· 483 474 484 475 register_xenstore_notifier(&xenstore_notifier); 485 476 486 - xenbus_frontend_wq = create_workqueue("xenbus_frontend"); 477 + if (xen_store_domain_type == XS_LOCAL) { 478 + xenbus_frontend_wq = create_workqueue("xenbus_frontend"); 479 + if (!xenbus_frontend_wq) 480 + pr_warn("create xenbus frontend workqueue failed, S3 resume is likely to fail\n"); 481 + } 487 482 488 483 return 0; 489 484 }