mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: fujo <hooyan2024@gmail.com>
Cc: linux-fsdevel@vger.kernel.org,
	Christian Brauner <brauner@kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] selftests/pidfd: wait for POLLHUP before reading exit info
Date: Sun, 18 Oct 2026 18:25:12 +0200	[thread overview]
Message-ID: <atTy6LziL5fdGTkn@redhat.com> (raw)
In-Reply-To: <179226499044.847.17334319321039510150@gmail.com>

On 10/17, fujo wrote:
>
> @@ -799,7 +799,7 @@ TEST(autokill_pidfd_open_no_effect)
>
>  	/* Verify child is still alive by polling the clone3 pidfd. */
>  	pfd.fd = pidfd;
> -	pfd.events = POLLIN;
> +	pfd.events = POLLHUP;
>  	ret = poll(&pfd, 1, 0);
>  	ASSERT_EQ(ret, 0) {
>  		TH_LOG("Child died after closing pidfd_open fd — should still be alive");

This chunk doesn't look right, POLLIN makes more sense in this case.
Unless I am confused, this poll(timeout = 0) tries to verify that the
child does not exit and report POLLIN, with or without POLLHUP.

Oleg.


  reply	other threads:[~2026-10-18 16:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17  5:43 [RFC PATCH] pidfs: don't report autoreaped tasks readable before exit info exists fujo
2026-10-17 13:48 ` Oleg Nesterov
2026-10-17 19:23 ` [PATCH v2] selftests/pidfd: wait for POLLHUP before reading exit info fujo
2026-10-18 16:25   ` Oleg Nesterov [this message]
2026-10-18 16:48     ` fujo
2026-10-18 19:27       ` Oleg Nesterov
2026-10-18 16:48     ` [PATCH v3] " fujo
2026-10-17 19:23 ` [RFC PATCH] pidfs: don't report autoreaped tasks readable before exit info exists fujo
2026-10-18 16:30   ` Oleg Nesterov

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=atTy6LziL5fdGTkn@redhat.com \
    --to=oleg@redhat.com \
    --cc=brauner@kernel.org \
    --cc=hooyan2024@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®