On Wed, Feb 03, 2021 at 01:21:59PM +0100, Jürgen Groß wrote: > > Will do > > > > In the patch I'm going to submit, may I add > > > > Reviewed-by: Jürgen Groß <jgr...@suse.com> > > ? > > > > Let me see the patch (including commit message) first, please. > > So just send out as a regular patch, and I'll respond accordingly. :-)
Attached is the new patch. As commit message I suggest: xenstored: close socket connections on error On error, don't keep socket connection in ignored state but close them. When the remote end of a socket is closed, xenstored will flag it as an error and switch the connection to ignored. But on some OSes (e.g. NetBSD), poll(2) will return only POLLIN in this case, so sockets in ignored state will stay open forever in xenstored (and it will loop with CPU 100% busy). -- Manuel Bouyer <bou...@antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference --
--- xenstored_core.c.orig 2021-02-03 13:25:38.568308454 +0100 +++ xenstored_core.c 2021-02-03 13:25:44.282429872 +0100 @@ -1440,6 +1440,9 @@ talloc_free(conn->in); conn->in = NULL; + /* if this is a socket connection, drop it now */ + if (conn->fd >= 0) + talloc_free(conn); } static const char *sockmsg_string(enum xsd_sockmsg_type type)