($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: Greg Depoire--Ferrer <greg@gregdf.com>, ell@lists.linux.dev
Subject: Re: Fix bug when stdin is closed
Date: Mon, 6 Jun 2022 13:18:39 -0500	[thread overview]
Message-ID: <522505f6-bf75-d30e-945c-6da6a256a40f@gmail.com> (raw)
In-Reply-To: <20220507235434.11693-1-greg@gregdf.com>

Hi Greg,

On 5/7/22 18:54, Greg Depoire--Ferrer wrote:
> Running iwd with FD 0 (stdin) closed fails because ell considers epoll_fd of 0 to mean failure. The first commit fixes
> that bug.
> 
> However, it still won't work because ell/dhcp6-transport.c has a bug where it closes a uninitialized FD (FD 0 on my
> machine) and that would cause an infinite loop because the epoll_wait call was returning EBADF. The second commit fixes
> that bug.
> 
> I noticed that ell/dhcp-transport.c is prone to the same mistake as the udp_fd field is not initialized on construction,
> but I don't know if the close can actually be called before the udp_fd field is set. Just to be sure, the third commit
> initializes it.
> 

Good catch(es)!  Patches 1 & 2 applied, thanks!  See my reply regarding patch 3.

Regards,
-Denis

      parent reply	other threads:[~2022-06-06 18:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07 23:54 Fix bug when stdin is closed Greg Depoire--Ferrer
2022-05-07 23:54 ` [PATCH 1/3] main: Accept FD 0 as epoll_fd Greg Depoire--Ferrer
2022-05-07 23:54 ` [PATCH 2/3] dhcp6-transport: Remove udp_fd field Greg Depoire--Ferrer
2022-05-07 23:54 ` [PATCH 3/3] dhcp-transport: Initialize the " Greg Depoire--Ferrer
2022-06-06 18:17   ` Denis Kenzior
2022-06-06 18:18 ` Denis Kenzior [this message]

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=522505f6-bf75-d30e-945c-6da6a256a40f@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ell@lists.linux.dev \
    --cc=greg@gregdf.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).