From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jason Andryuk <jandryuk@gmail.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH 0/8] Coverity fixes for vchan-socket-proxy
Date: Sat, 13 Jun 2020 14:40:44 +0200 [thread overview]
Message-ID: <20200613124044.GN6329@mail-itl> (raw)
In-Reply-To: <CAKf6xps9j=bszbw5SAYeZdrGS9jP-3Hu9RCGT45ifNR6qdAX3Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]
On Wed, May 27, 2020 at 10:59:55PM -0400, Jason Andryuk wrote:
> On Mon, May 25, 2020 at 6:36 PM Jason Andryuk <jandryuk@gmail.com> wrote:
> >
> > On Sun, May 24, 2020 at 10:50 PM Jason Andryuk <jandryuk@gmail.com> wrote:
> > >
> > > This series addresses some Coverity reports. To handle closing FDs, a
> > > state struct is introduced to track FDs closed in both main() and
> > > data_loop().
> >
> > I've realized the changes here are insufficient to handle the FD
> > leaks. That is, the accept()-ed FDs need to be closed inside the for
> > loop so they aren't leaked with each iteration. I'll re-work for a
> > v2.
>
> So it turns out this series doesn't leak FDs in the for loop. FDs are
> necessarily closed down in data_loop() when the read() returns 0. The
> only returns from data_loop() are after the FDs have been closed.
> data_loop() and some of the functions it calls will call exit(1) on
> error, but that won't leak FDs.
>
> Please review this series. Sorry for the confusion.
For the whole series:
Reviewed-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-06-13 12:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 2:49 [PATCH 0/8] Coverity fixes for vchan-socket-proxy Jason Andryuk
2020-05-25 2:49 ` [PATCH 1/8] vchan-socket-proxy: Ensure UNIX path NUL terminated Jason Andryuk
2020-06-13 12:40 ` Marek Marczykowski-Górecki
2020-05-25 2:49 ` [PATCH 2/8] vchan-socket-proxy: Check xs_watch return value Jason Andryuk
2020-05-25 2:49 ` [PATCH 3/8] vchan-socket-proxy: Unify main " Jason Andryuk
2020-05-25 2:49 ` [PATCH 4/8] vchan-socket-proxy: Use a struct to store state Jason Andryuk
2020-05-25 2:49 ` [PATCH 5/8] vchan-socket-proxy: Switch data_loop() to take state Jason Andryuk
2020-05-25 2:49 ` [PATCH 6/8] vchan-socket-proxy: Set closed FDs to -1 Jason Andryuk
2020-05-25 2:49 ` [PATCH 7/8] vchan-socket-proxy: Cleanup resources on exit Jason Andryuk
2020-05-25 2:49 ` [PATCH 8/8] vchan-socket-proxy: Handle closing shared input/output_fd Jason Andryuk
2020-05-25 22:36 ` [PATCH 0/8] Coverity fixes for vchan-socket-proxy Jason Andryuk
2020-05-28 2:59 ` Jason Andryuk
2020-06-13 12:40 ` Marek Marczykowski-Górecki [this message]
2020-06-14 14:05 ` Jason Andryuk
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=20200613124044.GN6329@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jandryuk@gmail.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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.