diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-02 13:19:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-02 13:19:57 -0500 |
commit | 0573fed92b671bfe6a302c67bb66471b18a5004d (patch) | |
tree | 66261a0e5eccc9d48c4656dfc4d9351365a45cd6 /drivers/xen | |
parent | 2833419a629d2d0eeb46f97c529f1057db7537b2 (diff) | |
parent | d811bcee1f7a379cad893fdee4c8db5775963b7f (diff) |
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
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/events/events_base.c | 4 | ||||
-rw-r--r-- | drivers/xen/pvcalls-back.c | 2 | ||||
-rw-r--r-- | drivers/xen/pvcalls-front.c | 11 |
3 files changed, 11 insertions, 6 deletions
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index 1ab4bd11f5f3..762378f1811c 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c | |||
@@ -755,8 +755,8 @@ out: | |||
755 | mutex_unlock(&irq_mapping_update_lock); | 755 | mutex_unlock(&irq_mapping_update_lock); |
756 | return irq; | 756 | return irq; |
757 | error_irq: | 757 | error_irq: |
758 | for (; i >= 0; i--) | 758 | while (nvec--) |
759 | __unbind_from_irq(irq + i); | 759 | __unbind_from_irq(irq + nvec); |
760 | mutex_unlock(&irq_mapping_update_lock); | 760 | mutex_unlock(&irq_mapping_update_lock); |
761 | return ret; | 761 | return ret; |
762 | } | 762 | } |
diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c index 156e5aea36db..b1092fbefa63 100644 --- a/drivers/xen/pvcalls-back.c +++ b/drivers/xen/pvcalls-back.c | |||
@@ -416,7 +416,7 @@ static int pvcalls_back_connect(struct xenbus_device *dev, | |||
416 | sock); | 416 | sock); |
417 | if (!map) { | 417 | if (!map) { |
418 | ret = -EFAULT; | 418 | ret = -EFAULT; |
419 | sock_release(map->sock); | 419 | sock_release(sock); |
420 | } | 420 | } |
421 | 421 | ||
422 | out: | 422 | out: |
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c index aedbee3b2838..2f11ca72a281 100644 --- a/drivers/xen/pvcalls-front.c +++ b/drivers/xen/pvcalls-front.c | |||
@@ -73,20 +73,25 @@ struct sock_mapping { | |||
73 | wait_queue_head_t inflight_conn_req; | 73 | wait_queue_head_t inflight_conn_req; |
74 | } active; | 74 | } active; |
75 | struct { | 75 | struct { |
76 | /* Socket status */ | 76 | /* |
77 | * Socket status, needs to be 64-bit aligned due to the | ||
78 | * test_and_* functions which have this requirement on arm64. | ||
79 | */ | ||
77 | #define PVCALLS_STATUS_UNINITALIZED 0 | 80 | #define PVCALLS_STATUS_UNINITALIZED 0 |
78 | #define PVCALLS_STATUS_BIND 1 | 81 | #define PVCALLS_STATUS_BIND 1 |
79 | #define PVCALLS_STATUS_LISTEN 2 | 82 | #define PVCALLS_STATUS_LISTEN 2 |
80 | uint8_t status; | 83 | uint8_t status __attribute__((aligned(8))); |
81 | /* | 84 | /* |
82 | * Internal state-machine flags. | 85 | * Internal state-machine flags. |
83 | * Only one accept operation can be inflight for a socket. | 86 | * Only one accept operation can be inflight for a socket. |
84 | * Only one poll operation can be inflight for a given socket. | 87 | * Only one poll operation can be inflight for a given socket. |
88 | * flags needs to be 64-bit aligned due to the test_and_* | ||
89 | * functions which have this requirement on arm64. | ||
85 | */ | 90 | */ |
86 | #define PVCALLS_FLAG_ACCEPT_INFLIGHT 0 | 91 | #define PVCALLS_FLAG_ACCEPT_INFLIGHT 0 |
87 | #define PVCALLS_FLAG_POLL_INFLIGHT 1 | 92 | #define PVCALLS_FLAG_POLL_INFLIGHT 1 |
88 | #define PVCALLS_FLAG_POLL_RET 2 | 93 | #define PVCALLS_FLAG_POLL_RET 2 |
89 | uint8_t flags; | 94 | uint8_t flags __attribute__((aligned(8))); |
90 | uint32_t inflight_req_id; | 95 | uint32_t inflight_req_id; |
91 | struct sock_mapping *accept_map; | 96 | struct sock_mapping *accept_map; |
92 | wait_queue_head_t inflight_accept_req; | 97 | wait_queue_head_t inflight_accept_req; |