[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 28/40] ivshmem: Drop the hackish test for UNIX do
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v3 28/40] ivshmem: Drop the hackish test for UNIX domain chardev |
Date: |
Tue, 15 Mar 2016 19:34:43 +0100 |
The chardev must be capable of transmitting SCM_RIGHTS ancillary
messages. We check it by comparing CharDriverState member filename to
"unix:". That's almost as brittle as it is disgusting.
When the actual transmission all happened asynchronously, this check
was all we could do in realize(), and thus better than nothing. But
now we receive at least one SCM_RIGHTS synchronously in realize(),
it's not worth its keep anymore. Drop it.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
---
hw/misc/ivshmem.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index da32a74..c1a75db 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -964,15 +964,6 @@ static void pci_ivshmem_realize(PCIDevice *dev, Error
**errp)
memory_region_add_subregion(&s->bar, 0, mr);
pci_register_bar(PCI_DEVICE(s), 2, attr, &s->bar);
} else if (s->server_chr != NULL) {
- /* FIXME do not rely on what chr drivers put into filename */
- if (strncmp(s->server_chr->filename, "unix:", 5)) {
- error_setg(errp, "chardev is not a unix client socket");
- return;
- }
-
- /* if we get a UNIX socket as the parameter we will talk
- * to the ivshmem server to receive the memory region */
-
IVSHMEM_DPRINTF("using shared memory server (socket = %s)\n",
s->server_chr->filename);
--
2.4.3
- [Qemu-devel] [PATCH v3 30/40] ivshmem: Tighten check of property "size", (continued)
- [Qemu-devel] [PATCH v3 30/40] ivshmem: Tighten check of property "size", Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 01/40] target-ppc: Document TOCTTOU in hugepage support, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 16/40] ivshmem: Fix harmless misuse of Error, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 34/40] qdev: New DEFINE_PROP_ON_OFF_AUTO, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 29/40] ivshmem: Simplify how we cope with short reads from server, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 39/40] ivshmem: Require master to have ID zero, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 31/40] ivshmem: Implement shm=... with a memory backend, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 05/40] event_notifier: Make event_notifier_init_fd() #ifdef CONFIG_EVENTFD, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 28/40] ivshmem: Drop the hackish test for UNIX domain chardev,
Markus Armbruster <=
- [Qemu-devel] [PATCH v3 32/40] ivshmem: Simplify memory regions for BAR 2 (shared memory), Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 38/40] ivshmem: Drop ivshmem property x-memdev, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH v3 37/40] ivshmem: Clean up after the previous commit, Markus Armbruster, 2016/03/15