From 89b03df4f3bd19f9dc717dfc1c03e81d213e4d3d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 6 Feb 2025 11:02:22 -0500 Subject: ioq: Use getppid() for the heavy NOP syscall getpid() could hypothetically be cached (and glibc used to do it). getppid() can't be, because the parent could die and reparent the child to init. Link: https://lore.kernel.org/linux-mm/Z58dIOGlJ3grsAge@casper.infradead.org/ --- src/ioq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ioq.c b/src/ioq.c index 0e7ac42..064e0e8 100644 --- a/src/ioq.c +++ b/src/ioq.c @@ -617,7 +617,7 @@ static void ioq_dispatch_sync(struct ioq *ioq, struct ioq_ent *ent) { case IOQ_NOP: if (ent->nop.type == IOQ_NOP_HEAVY) { // A fast, no-op syscall - getpid(); + getppid(); } ent->result = 0; return; -- cgit v1.2.3