qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 3/6] monitor: Clean up fd sets on monitor dis


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v6 3/6] monitor: Clean up fd sets on monitor disconnect
Date: Tue, 7 Aug 2012 18:32:07 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Aug 03, 2012 at 01:28:06PM -0400, Corey Bryant wrote:
> Each fd set has a boolean that keeps track of whether or not the
> fd set is in use by a monitor connection.  When a monitor
> disconnects, all fds that are members of an fd set with refcount
> of zero are closed.  This prevents any fd leakage associated with
> a client disconnect prior to using a passed fd.
> 
> v5:
>  -This patch is new in v5.
>  -This support addresses concerns from v4 regarding fd leakage
>   if the client disconnects unexpectedly. (address@hidden,
>   address@hidden, address@hidden)
> 
> v6:
>  -No changes
> 
> Signed-off-by: Corey Bryant <address@hidden>
> ---
>  monitor.c |   15 +++++++++++++++
>  1 file changed, 15 insertions(+)

The lifecycle of fdsets and fds isn't clear to me.  It seems like just a
refcount in fdset should handle this without extra fields like in_use.

Stefan



reply via email to

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