[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 30/42] ivshmem: Drop the hackish test for UNIX do
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v2 30/42] ivshmem: Drop the hackish test for UNIX domain chardev |
Date: |
Mon, 7 Mar 2016 20:25:42 +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 ca64654..2b14daa 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -960,15 +960,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 v2 32/42] ivshmem: Tighten check of property "size", (continued)
- [Qemu-devel] [PATCH v2 32/42] ivshmem: Tighten check of property "size", Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 26/42] ivshmem: Plug leaks on unplug, fix peer disconnect, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 37/42] ivshmem: Replace int role_val by OnOffAuto master, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 39/42] ivshmem: Clean up after the previous commit, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 31/42] ivshmem: Simplify how we cope with short reads from server, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 29/42] ivshmem: Rely on server sending the ID right after the version, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 38/42] ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem, Markus Armbruster, 2016/03/07
- [Qemu-devel] [PATCH v2 30/42] ivshmem: Drop the hackish test for UNIX domain chardev,
Markus Armbruster <=
- [Qemu-devel] [PATCH v2 17/42] ivshmem: Don't destroy the chardev on version mismatch, Markus Armbruster, 2016/03/07
- Re: [Qemu-devel] [PATCH v2 00/42] ivshmem: Fixes, cleanups, device model split, Paolo Bonzini, 2016/03/08
- Re: [Qemu-devel] [PATCH v2 00/42] ivshmem: Fixes, cleanups, device model split, Paolo Bonzini, 2016/03/08