mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fork: Avoid inherit PF_IO_WORKER flag
@ 2022-12-15  2:01 Haifeng Xu
  0 siblings, 0 replies; only message in thread
From: Haifeng Xu @ 2022-12-15  2:01 UTC (permalink / raw)
  To: brauner
  Cc: ebiederm, tglx, luto, bigeasy, akpm, fenghua.yu, peterz,
	linux-kernel, Haifeng Xu

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.

Signed-off-by: Haifeng Xu <haifeng.xu@shopee.com>
---
 kernel/fork.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 947eb1a6399a..50498e5d10dd 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -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
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-15  2:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15  2:01 [PATCH] fork: Avoid inherit PF_IO_WORKER flag Haifeng Xu

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®