[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] sockets: Use SOMAXCONN for Unix socket listen()
From: |
Eric Blake |
Subject: |
Re: [PATCH] sockets: Use SOMAXCONN for Unix socket listen() |
Date: |
Fri, 5 Feb 2021 13:04:08 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 2/5/21 3:55 AM, Daniel P. Berrangé wrote:
>> +++ b/util/qemu-sockets.c
>> @@ -1059,7 +1059,7 @@ int unix_listen(const char *str, Error **errp)
>>
>> saddr = g_new0(UnixSocketAddress, 1);
>> saddr->path = g_strdup(str);
>> - sock = unix_listen_saddr(saddr, 1, errp);
>> + sock = unix_listen_saddr(saddr, SOMAXCONN, errp);
>> qapi_free_UnixSocketAddress(saddr);
>> return sock;
>> }
>
> This method is a legacy back compat function, only used by the QEMU
> guest agent, so this can't explain the NBD problems, which use the
> QIONetListener class.
>
> IOW, the problem is in the qemu-nbd.c / blockdev-nbd.c code I believe
D'oh. Serves me right for trying to guess the spot using just a grep on
listen() rather than running under gdb with a breakpoint to find the
actual backtrace. v2 posted with a slightly changed subject line, and
this time tested to actually work.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org