xen: fixes for v4.16-rc4
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABAgAGBQJamYZrAAoJELDendYovxMv8N4H/A2HOfHGnmrg+Q1eLf0vRzOD +5MsVdjpYCqfkbFF+ITTC/yQL6sQfYIA9pzFKzmyabO3xwXGtg0sJToBbQhtmVDh opp/2bYyG8VN+Pmhe9Rc7L0ON0ShDeCs+J5L/8scPE52EKLiinLlBGWMgwIFYMII EehLWHtWiVjHG+Od1nnGNJhuxhWzk5FqdTBBerUt4+ra2zT0Luhe3iVnXl7f3I81 EpYbjNZ7D+yOwVoGJf200RHiGr/ItavQYvTjYP9Mau4InRlOIs6COhWTSRjGvuiC Sp4Ra5mR/eSgPb0VO1Qc0nOjZqdgiQEM7hzmKKP+A1gbLhsYH3ghhuHmQOPlbe0= =e01A -----END PGP SIGNATURE----- Merge tag 'for-linus-4.16a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Five minor fixes for Xen-specific drivers" * tag 'for-linus-4.16a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: pvcalls-front: 64-bit align flags x86/xen: add tty0 and hvc0 as preferred consoles for dom0 xen-netfront: Fix hang on device removal xen/pirq: fix error path cleanup when binding MSIs xen/pvcalls: fix null pointer dereference on map->sock
This commit is contained in:
commit
0573fed92b
|
@ -1376,8 +1376,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
|||
|
||||
if (!xen_initial_domain()) {
|
||||
add_preferred_console("xenboot", 0, NULL);
|
||||
add_preferred_console("tty", 0, NULL);
|
||||
add_preferred_console("hvc", 0, NULL);
|
||||
if (pci_xen)
|
||||
x86_init.pci.arch_init = pci_xen_init;
|
||||
} else {
|
||||
|
@ -1410,6 +1408,10 @@ asmlinkage __visible void __init xen_start_kernel(void)
|
|||
|
||||
xen_boot_params_init_edd();
|
||||
}
|
||||
|
||||
add_preferred_console("tty", 0, NULL);
|
||||
add_preferred_console("hvc", 0, NULL);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
/* PCI BIOS service won't work from a PV guest. */
|
||||
pci_probe &= ~PCI_PROBE_BIOS;
|
||||
|
|
|
@ -2005,7 +2005,10 @@ static void netback_changed(struct xenbus_device *dev,
|
|||
case XenbusStateInitialised:
|
||||
case XenbusStateReconfiguring:
|
||||
case XenbusStateReconfigured:
|
||||
break;
|
||||
|
||||
case XenbusStateUnknown:
|
||||
wake_up_all(&module_unload_q);
|
||||
break;
|
||||
|
||||
case XenbusStateInitWait:
|
||||
|
@ -2136,7 +2139,9 @@ static int xennet_remove(struct xenbus_device *dev)
|
|||
xenbus_switch_state(dev, XenbusStateClosing);
|
||||
wait_event(module_unload_q,
|
||||
xenbus_read_driver_state(dev->otherend) ==
|
||||
XenbusStateClosing);
|
||||
XenbusStateClosing ||
|
||||
xenbus_read_driver_state(dev->otherend) ==
|
||||
XenbusStateUnknown);
|
||||
|
||||
xenbus_switch_state(dev, XenbusStateClosed);
|
||||
wait_event(module_unload_q,
|
||||
|
|
|
@ -755,8 +755,8 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,
|
|||
mutex_unlock(&irq_mapping_update_lock);
|
||||
return irq;
|
||||
error_irq:
|
||||
for (; i >= 0; i--)
|
||||
__unbind_from_irq(irq + i);
|
||||
while (nvec--)
|
||||
__unbind_from_irq(irq + nvec);
|
||||
mutex_unlock(&irq_mapping_update_lock);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -416,7 +416,7 @@ static int pvcalls_back_connect(struct xenbus_device *dev,
|
|||
sock);
|
||||
if (!map) {
|
||||
ret = -EFAULT;
|
||||
sock_release(map->sock);
|
||||
sock_release(sock);
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
@ -73,20 +73,25 @@ struct sock_mapping {
|
|||
wait_queue_head_t inflight_conn_req;
|
||||
} active;
|
||||
struct {
|
||||
/* Socket status */
|
||||
/*
|
||||
* Socket status, needs to be 64-bit aligned due to the
|
||||
* test_and_* functions which have this requirement on arm64.
|
||||
*/
|
||||
#define PVCALLS_STATUS_UNINITALIZED 0
|
||||
#define PVCALLS_STATUS_BIND 1
|
||||
#define PVCALLS_STATUS_LISTEN 2
|
||||
uint8_t status;
|
||||
uint8_t status __attribute__((aligned(8)));
|
||||
/*
|
||||
* Internal state-machine flags.
|
||||
* Only one accept operation can be inflight for a socket.
|
||||
* Only one poll operation can be inflight for a given socket.
|
||||
* flags needs to be 64-bit aligned due to the test_and_*
|
||||
* functions which have this requirement on arm64.
|
||||
*/
|
||||
#define PVCALLS_FLAG_ACCEPT_INFLIGHT 0
|
||||
#define PVCALLS_FLAG_POLL_INFLIGHT 1
|
||||
#define PVCALLS_FLAG_POLL_RET 2
|
||||
uint8_t flags;
|
||||
uint8_t flags __attribute__((aligned(8)));
|
||||
uint32_t inflight_req_id;
|
||||
struct sock_mapping *accept_map;
|
||||
wait_queue_head_t inflight_accept_req;
|
||||
|
|
Loading…
Reference in New Issue