qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 2/2] io: fix qio_channel_socket_accept err handling
Date: Wed, 02 Aug 2017 10:26:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Peter Xu <address@hidden> 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 trace_qio_channel_socket_accept_fail() after
> the if check on EINTR. Two reasons:
>
> 1. when EINTR happened, it's not really a fault (we should just try
>    again), so we should not log with an "accept failure".
>
> 2. trace_*() functions may overwrite errno, then the old errno will be
>    missing. We need to either check errno before trace_*() calls, or
>    reserve the errno.
>
> Signed-off-by: Peter Xu <address@hidden>

Reviewed-by: Juan Quintela <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]