public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v1 1/1] ioctl_pidfd06: expect EREMOTE for PIDFD_GET_INFO across pidns
@ 2026-02-18 19:02 Jan Polensky
  2026-02-19  8:19 ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Polensky @ 2026-02-18 19:02 UTC (permalink / raw)
  To: chrubis, pvorel; +Cc: Linux Test Project

Kernel changed PIDFD_GET_INFO semantics when the pidfd refers to a task
that has no PID in the caller's current pid namespace: return -EREMOTE
instead of -ESRCH, allowing userspace to distinguish “different pidns”
from “process exited”.

Update ioctl_pidfd06 to expect EREMOTE in that case.

Link: https://www.spinics.net/lists/linux-fsdevel/msg326699.html
Link: https://lkml.org/lkml/2026/2/16/608
Link: https://lore.kernel.org/r/20260214010245.3671907-34-sashal@kernel.org
Signed-off-by: Jan Polensky <japo@linux.ibm.com>
---
 testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
index 751281bacb74..81205afb72a6 100644
--- a/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
+++ b/testcases/kernel/syscalls/ioctl/ioctl_pidfd06.c
@@ -41,7 +41,7 @@ static void run(void)
 	args->exit_signal = SIGCHLD;
 
 	if (!SAFE_CLONE(args)) {
-		TST_EXP_FAIL(ioctl(pidfd, PIDFD_GET_INFO, info), ESRCH);
+		TST_EXP_FAIL(ioctl(pidfd, PIDFD_GET_INFO, info), EREMOTE);
 		exit(0);
 	}
 
-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-19 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18 19:02 [LTP] [PATCH v1 1/1] ioctl_pidfd06: expect EREMOTE for PIDFD_GET_INFO across pidns Jan Polensky
2026-02-19  8:19 ` Petr Vorel
2026-02-19  8:49   ` Andrea Cervesato via ltp
2026-02-19 15:59     ` Jan Polensky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox