Skip to contentSkip to conversation

fork: Avoid inherit PF_IO_WORKER flag

PATCH New Haifeng Xu 1 participant 1 message Dec 15, 2022

Subsystems (3)
lore
Share & tools
lore

Haifeng Xu

author
#0 lore raw

PATCH 1/1 fork: Avoid inherit PF_IO_WORKER flag

copy_process examines arguments in kernel_clone_args to see if PF_IO_WORKER need to be set, so the flag should not inherit from parent process.

---
 kernel/fork.c | 1 +
 1 file changed, 1 insertion(+)
kernel/fork.c +1 -0
index 947eb1a6399a..50498e5d10dd 100644
@@ -2088,6 +2088,7 @@ static __latent_entropy struct task_struct *copy_process(
 	p->flags &= ~PF_KTHREAD;
 	if (args->kthread)
 		p->flags |= PF_KTHREAD;
+	p->flags &= ~PF_IO_WORKER;
 	if (args->io_thread) {
 		/*
 		 * Mark us an IO worker, and block any signal that isn't
Signature · 1 line
2.25.1