All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Manuel Bouyer <bouyer@antioche.eu.org>
Cc: xen-devel@lists.xen.org
Subject: Re: xenstored file descriptor leak
Date: Wed, 3 Feb 2021 09:21:32 +0100	[thread overview]
Message-ID: <89ddaac0-eb05-8ddb-465a-60d78e4009eb@suse.com> (raw)
In-Reply-To: <20210203081621.GD445@antioche.eu.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 973 bytes --]

On 03.02.21 09:16, Manuel Bouyer wrote:
> On Wed, Feb 03, 2021 at 09:05:27AM +0100, Jürgen Groß wrote:
>>>> [...]
>>>> Yes, I think this is a good idea.
>>>
>>> Well, after some sleep I don't think it is. We should always keep at last
>>> POLLIN or we will never notice a socket close otherwise.
>>
>> Adding the fd of an ignored socket connection to the list is the real
>> problem here. Why should that be done?
> 
> If we don't do it, we never notice when the socket is closed and the file
> descriptor will stay forever. When I tried it, I had about 50 zombie
> file descriptors open in xenstored, after starting only 2 domains.

This shouldn't happen in case we are closing the socket actively.

In the end we should just do a talloc_free(conn) in
ignore_connection() if it is a socket based one. This should revert
the critical modification of the XSA-115 fixes for sockets while
keeping the desired effect for domain connections.


Juergen

[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2021-02-03  8:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 18:37 xenstored file descriptor leak Manuel Bouyer
2021-02-03  6:18 ` Jürgen Groß
2021-02-03  7:57   ` Manuel Bouyer
2021-02-03  8:05     ` Jürgen Groß
2021-02-03  8:16       ` Manuel Bouyer
2021-02-03  8:21         ` Jürgen Groß [this message]
2021-02-03 11:48           ` Manuel Bouyer
2021-02-03 11:54             ` Jürgen Groß
2021-02-03 12:03               ` Manuel Bouyer
2021-02-03 12:13                 ` Jürgen Groß
2021-02-03 12:17                   ` Manuel Bouyer
2021-02-03 12:21                     ` Jürgen Groß
2021-02-03 12:33                       ` Manuel Bouyer
2021-02-03 12:42                         ` Jürgen Groß
2021-02-03 12:47                           ` Manuel Bouyer
2021-02-03 12:58                             ` Jürgen Groß
2021-02-03 13:03                               ` Manuel Bouyer
2021-02-03 13:11                                 ` Jürgen Groß
2021-02-03 13:24                                   ` Manuel Bouyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89ddaac0-eb05-8ddb-465a-60d78e4009eb@suse.com \
    --to=jgross@suse.com \
    --cc=bouyer@antioche.eu.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.