Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp362926rwb; Wed, 14 Dec 2022 18:46:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf6UK1jbAKkY8OEEuls9Nrc2KXEILYVjrZG8PIVtyobebKhBnykrKulsF6e1co4jjjdOGn8w X-Received: by 2002:a17:906:d8a5:b0:7c1:6f86:eeb with SMTP id qc5-20020a170906d8a500b007c16f860eebmr14106933ejb.7.1671072395453; Wed, 14 Dec 2022 18:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671072395; cv=none; d=google.com; s=arc-20160816; b=mHc1GM9u7OQczHKv76ylGrD2Cv8nGs+dWM0Q/XZX6Z7gqcx5vjXvCQGQ+zx37s/0L8 JF/1nq1rBrg4sLRV87VjCZ8HQI+Gen2nzlMvpjrXnUWYR9bWCKCBGtP1tvb2C6Oa7iYw 8W/nx414WhJuQMRvsrl7zc14BL5YXM3J73k+T9Qsv9hmW4rbeTdjClC19/L7tc94C6mT AqIWzs25brcaklymdWnJ0cIOm8V9fLLI5p/i4IEdO6ACZoMOnD+TRJI1jAS5ZaX7opFs Fanj6EdMp53zGYjEpfRYMwBkTo8M/prbSiWIN5AtnL8/4EA+PB50XzOyiPCwP7hnkmHt MUVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=M4lAe37d4fe+tyUc8VHnbsRTRPV2Q4pwHpZC+HfReys=; b=eHdJy6KOGwV90KbZKy6srDwcUUE/o3Gyn+WrakhzvGmWnZexeuXhku8ArkC277Tv8L 2bJvaGThapLanzQek4WCZlweWuMnt3lKZtvewNboqsO3kl0wOA9zJZ76zGWBJb9FbLLW xnr+/YaByTquSWUYGMtlEjL9of2gSoHOX9/HV5wjoIKC5J2HtH+JcvM6V5O5l065+5sC 3+pzbFxFdFonYi72eHdiC62jqM82P9V/pRWOIIRf5iu1FIFDzQ5AY6bl82CBATyj1Z4I GT1Z7KBvuXDNCqM+eYRaV7G3FDNUXQO38Nmz7JxBrrSdQNHQcI+qiy1liDnhk3B822/a ucWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=P35Nvhay; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw10-20020a1709066a0a00b0078db18d796dsi12101492ejc.982.2022.12.14.18.46.19; Wed, 14 Dec 2022 18:46:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=P35Nvhay; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbiLOCCK (ORCPT + 69 others); Wed, 14 Dec 2022 21:02:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiLOCCF (ORCPT ); Wed, 14 Dec 2022 21:02:05 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F9F933C26 for ; Wed, 14 Dec 2022 18:02:04 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id t11-20020a17090a024b00b0021932afece4so1202185pje.5 for ; Wed, 14 Dec 2022 18:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopee.com; s=shopee.com; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=M4lAe37d4fe+tyUc8VHnbsRTRPV2Q4pwHpZC+HfReys=; b=P35Nvhay6le5agNzNBEf8tekkHeu302a1sZXUJjDHaHDcC4xuOBspDQ0c6+u4Yfmmt CGlQgMXlPJre6tr1YVR1CoIGOj417kUiP5Q3KzTnd5UOfRfn16ny8tUjjEYR5ifJCXq9 I7OGH7ect7bPCKpW6zc+LE11luOwJFi01LA7L+NLV2g3amhincPz8mcProN3oUMxMmvi zaqrSYO92XpohfzlK2pZ1GzQvikFoe6Z/1sCbNqV4h+ZAz3QpkmfawBn75Ejmrtt6u6N 0dY2xWJqj+zxjIvTHHj2FkZVaoge+YVxBF0jgrwUpLXkApm0l4SAEBzl8n4u45iKS7OQ Bjmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M4lAe37d4fe+tyUc8VHnbsRTRPV2Q4pwHpZC+HfReys=; b=vLPrZgq1Hx+A3mJ0jtY8nvOrntRZ6QlSv8I04Ws3r6LSKNMB8lYOzrbFN9gVHt3mxY rjUDJ+oprnn9VxHrP57qPfgRvn6ZBppk0kAzMoPU+9gdfdxwBPg2O6+6dnMsZkP+4K9K 3wKmcjJ5kebGu/cpAGI9oIuAd8gG77Zs5TT4ISQpyisB+z1wc/OjzqYVCQSFo4oxfPV9 TmFJQ3cm+hbG1a1KfBG/g8V1xprNQzxQJ/AjzCBM5LcUOz5seECoqGHqM8YF5vgZttaT pz96jCbLM1jtoyN+1UAInvraRkRGGYTZ8Xo7FphDlHzBNl0xReB+taTN1k4Z0h0LvsN/ lMEA== X-Gm-Message-State: ANoB5pkjy8RMYALDmsX9I81Wxj0wrRtVM2n3OoVph8FFz7Xm0HaLioBI 5by4//xTpqsw5+NFvFNpn6OwbhI+PxrLqIZPWfEK7A== X-Received: by 2002:a17:902:8347:b0:189:4bf4:2cfc with SMTP id z7-20020a170902834700b001894bf42cfcmr26691302pln.31.1671069724116; Wed, 14 Dec 2022 18:02:04 -0800 (PST) Received: from ubuntu-haifeng.default.svc.cluster.local ([101.127.248.173]) by smtp.gmail.com with ESMTPSA id q8-20020a170902a3c800b00174c1855cd9sm2464431plb.267.2022.12.14.18.01.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 18:02:02 -0800 (PST) From: Haifeng Xu To: brauner@kernel.org Cc: ebiederm@xmission.com, tglx@linutronix.de, luto@kernel.org, bigeasy@linutronix.de, akpm@linux-foundation.org, fenghua.yu@intel.com, peterz@infradead.org, linux-kernel@vger.kernel.org, Haifeng Xu Subject: [PATCH] fork: Avoid inherit PF_IO_WORKER flag Date: Thu, 15 Dec 2022 02:01:22 +0000 Message-Id: <20221215020122.762684-1-haifeng.xu@shopee.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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