[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20221215020122.762684-1-haifeng.xu@shopee.com>
Date: Thu, 15 Dec 2022 02:01:22 +0000
From: Haifeng Xu <haifeng.xu@...pee.com>
To: brauner@...nel.org
Cc: ebiederm@...ssion.com, tglx@...utronix.de, luto@...nel.org,
bigeasy@...utronix.de, akpm@...ux-foundation.org,
fenghua.yu@...el.com, peterz@...radead.org,
linux-kernel@...r.kernel.org, Haifeng Xu <haifeng.xu@...pee.com>
Subject: [PATCH] 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.
Signed-off-by: Haifeng Xu <haifeng.xu@...pee.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
Powered by blists - more mailing lists