Re: [Qemu-devel] [PATCH v2 2/2] io: fix qio_channel_socket_accept err handling

2017-08-02 Thread Daniel P. Berrange
On Wed, Aug 02, 2017 at 05:41:20PM +0800, Peter Xu wrote: > When accept failed, we should setup errp with the reason. More > importantly, the caller may assume errp be non-NULL when error happens, > and not setting the errp may crash QEMU. > > At the same time, move the

[Qemu-devel] [PATCH v2 2/2] io: fix qio_channel_socket_accept err handling

2017-08-02 Thread Peter Xu
When accept failed, we should setup errp with the reason. More importantly, the caller may assume errp be non-NULL when error happens, and not setting the errp may crash QEMU. At the same time, move the trace_qio_channel_socket_accept_fail() after the if check on EINTR. Two reasons: 1. when