diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2025-02-06 11:02:22 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2025-02-06 11:02:38 -0500 |
commit | 89b03df4f3bd19f9dc717dfc1c03e81d213e4d3d (patch) | |
tree | 12f70ce6f20c0c889da3f46acd19f2fc0cab2278 /src | |
parent | 0dccdae4510ff5603247be871e64a6119647ea2a (diff) | |
download | bfs-89b03df4f3bd19f9dc717dfc1c03e81d213e4d3d.tar.xz |
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/
Diffstat (limited to 'src')
-rw-r--r-- | src/ioq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |