Re: [Qemu-devel] [PATCH v5 4/4] sockets: Handle race condition between binds to the same port

2017-07-29 Thread Knut Omang
On Tue, 2017-07-25 at 10:54 +0100, Daniel P. Berrange wrote: > On Sat, Jul 22, 2017 at 09:49:33AM +0200, Knut Omang wrote: > > If an offset of ports is specified to the inet_listen_saddr function(), > > and two or more processes tries to bind from these ports at the same time, > > occasionally

Re: [Qemu-devel] [PATCH v5 4/4] sockets: Handle race condition between binds to the same port

2017-07-25 Thread Daniel P. Berrange
On Sat, Jul 22, 2017 at 09:49:33AM +0200, Knut Omang wrote: > If an offset of ports is specified to the inet_listen_saddr function(), > and two or more processes tries to bind from these ports at the same time, > occasionally more than one process may be able to bind to the same > port. The

[Qemu-devel] [PATCH v5 4/4] sockets: Handle race condition between binds to the same port

2017-07-22 Thread Knut Omang
If an offset of ports is specified to the inet_listen_saddr function(), and two or more processes tries to bind from these ports at the same time, occasionally more than one process may be able to bind to the same port. The condition is detected by listen() but too late to avoid a failure. This