Message ID | 20230913005647.1534747-1-Liam.Howlett@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp161758vqi; Thu, 14 Sep 2023 00:04:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHZL08LJ2qEzzeUR3NiMi+0z/bFwCnLLG+pF9p+h0otiUU3jSDdy5boib8iDnklTB+cRyGY X-Received: by 2002:a17:903:1110:b0:1c3:bc2a:f6b7 with SMTP id n16-20020a170903111000b001c3bc2af6b7mr5420477plh.52.1694675080593; Thu, 14 Sep 2023 00:04:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694675080; cv=pass; d=google.com; s=arc-20160816; b=yxL6fLBo1ep/YY9ipTh0B1YBbM/ZxAJ3gWPxdWI32qdMHnhiA/tGMG2+p7EfnTjo1T yUPJzi4pg1LIaSEJ1aShe/5xWD4ZOTsxHWHjP6umu6PbLLRna1rKwFnUrhy0MFJlfmYR SKNJLLvcixgDRIJQ8YN3sdG6JsXsvSebHxOuq8UJZWSLaaD1397VNhPaLUpO325d6QQ/ UnIJtC/ageLTi1X/wyymDpolfS6R8BfOncOfhUUBls9Zq5VhpmXo8sOEoIIioUaIlDLG /kMb8wqP8Hu4jkHgVCi4VfK0pNPApKz/ayM6cMKmgVG2CxviURY8+Z3ytq3khJ/7jkdt lrkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=Sna73Ly9yn59bFkXBPnNZeV/TPCpl2hhnd2KgPROqDQ=; fh=/HKe3T+2Y8CT/8IgP9b3PELPjwKVy5sjbQHkQJAT37M=; b=Md0JOiieVe2D6AkcWb4KClHzxyjMPCx83FMZFUY4RqS9WpbtEY8tZHJxsRvPy2l2j8 oH78ZGe8BeKGW8AGaw8cuqEf4BxBPHmyS0sCbEnffqkA//q08ytcH2WSvOVYvWqA4xo1 7ReYoXi7VLvl29iUYx6K/HPDUoLR6FrkPt66TOGz/GRIgASPzkzJlyWgbJ4OgvXILppp 4xZeZ59u15esALMOqz+8TBtuaGxOLfVsWfz9QXXf0RdSwHSmjeNS+0iEWNGZM7c3MLO8 Upp0iAT7uE7WnLV/6LtX/LBHJ/HjUNSPyJGpz2jQ3VynZFrB+p6YkNv1gsEFS3lie0Y8 IHew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=fS0XXa9b; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=eXiUXXrC; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id m7-20020a170902db0700b001b845157b69si1159192plx.414.2023.09.14.00.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 00:04:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=fS0XXa9b; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=eXiUXXrC; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7458B82DAD0F; Tue, 12 Sep 2023 17:58:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237992AbjIMA6L (ORCPT <rfc822;pwkd43@gmail.com> + 36 others); Tue, 12 Sep 2023 20:58:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229553AbjIMA6H (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 12 Sep 2023 20:58:07 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C34E10CC; Tue, 12 Sep 2023 17:58:04 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38CKePZw003307; Wed, 13 Sep 2023 00:57:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=Sna73Ly9yn59bFkXBPnNZeV/TPCpl2hhnd2KgPROqDQ=; b=fS0XXa9b1lP5GuL8T4XBzuwZLeMA3vtU5pqCByxWToldfoi65uHdFFdRbk25LKibaPR0 juk7v/BFEBBDzSo20BdjBQZGr3LHRxs+a1aDccQMnLCTGND4dt97X21DpqRMIGXmDTgl 4C4IDqditaG+zR6NAqbwXyqwuAOFA/2KBZfSSNRNzEV5cQOd8a+dTCIL3iHsJORJTaCb a2hyIkOeApxauAzDd+duzyO7rgaPOOTiDTNJd+HoxmfQblwcUf0TU/RJfOgvpILL4eLz wkQERzvXWHAOuhYzOQxzoQF11xzq/q/Om636zRy+7VkD4MITkpogWYXdS6ioJdvZBY3w 4A== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t2y7r89ug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Sep 2023 00:57:19 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38CNkk18002750; Wed, 13 Sep 2023 00:57:19 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2172.outbound.protection.outlook.com [104.47.55.172]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t0f5csv2x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Sep 2023 00:57:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KN0cOP20F2Hy3h+IM/eqy24aV6hTXF6XX35Aw9QB2aFe/SsRGKYggVKzFeIFVXyJYU95fq9ZWyeBDoLaZT8keOmMOzkH72K5eI6uetF2MS8tj9CVQfygrnkzKt1+3FsDJneMX6a6SqV/3cch58iY5sIj52k1g1jDkJjtGDUfvxu4EtQyR9UTQb5qOUJHY2KshQOHTfdnNn4S8fGzleMJxRTdlxEblnXLi+6IxGFhm3d4P29jXo7C7T8rRUs+3AMDHV5fl2ab8BWce6NQLvh/nscqlyRpBIBUn0V/Mv4tMEmyE+eSTDGtEURFPi9QVa07tTEy73QazFlIvhnOFPkOgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Sna73Ly9yn59bFkXBPnNZeV/TPCpl2hhnd2KgPROqDQ=; b=RhMYBEYDvdxYjwiRT+TGpj7GN60FPmDvH3Bjys6oLlfW/lQRVWWKl4tEiLUa+p5B3CQU/eUdMReKixhZSoGGGRkWKnxKy0fOgkYM0QPneG64HWlckGBIUPkmqnuwEgIrU8CiT0OhuSQgmNg0/sxft01Ab2s82sHmr+SVKR4n9NPF9ziKfuAWjeCShuiCnUrqBPWoqSTDoqkRWHuJSSovzfmfUpRPTQ6W1qzi5pBSn+z59sADkZtr9MphqDhR2Zdlx0Cn4hUzyMH3F1/5qw+xBwMU0ira+LDfyLdvFHBGNwkQpwRpKBQvkYAwNt70OewQGCdwfi5uuZaYef96Z54IjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Sna73Ly9yn59bFkXBPnNZeV/TPCpl2hhnd2KgPROqDQ=; b=eXiUXXrCTRr2KvdGAN5GGVq2Yhb9CgZMaHbpSsc91pgV8UJ8/bx3MBbSAJeGySGC6axnpiWuZdQ+TFku+bE54xpyTj6FKr4HVO3acSpvpNgFkzMYxAJi1PZ6EEtHqNeOYZkXq0mvjWy13hlUy9q8mQ0cMMH2KEyJ/TVjmqsXMHY= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by BY5PR10MB4307.namprd10.prod.outlook.com (2603:10b6:a03:212::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.19; Wed, 13 Sep 2023 00:57:17 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa%4]) with mapi id 15.20.6768.036; Wed, 13 Sep 2023 00:57:17 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" <Liam.Howlett@oracle.com>, stable@vger.kernel.org, Geert Uytterhoeven <geert@linux-m68k.org>, "Paul E. McKenney" <paulmck@kernel.org>, Christophe Leroy <christophe.leroy@csgroup.eu>, Andreas Schwab <schwab@linux-m68k.org>, Matthew Wilcox <willy@infradead.org>, Peng Zhang <zhangpeng.00@bytedance.com>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, "Mike Rapoport (IBM)" <rppt@kernel.org>, Vlastimil Babka <vbabka@suse.cz> Subject: [PATCH] init/main: Clear boot task idle flag Date: Tue, 12 Sep 2023 20:56:47 -0400 Message-Id: <20230913005647.1534747-1-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4PR01CA0078.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:ff::28) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|BY5PR10MB4307:EE_ X-MS-Office365-Filtering-Correlation-Id: 23891183-d736-4095-4e22-08dbb3f46016 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mAjRe6Itgh4jV8uc8wZK6qT5w9vt/DkMUsl/2v1T+62n1GZnz0yyj1lcP5vImpOIbH83CMKQHyH34qoT82vbGx1huUgcllb9va3SR4pbCjvWGryM+KphkO3jKOLrSQ19L5bWR8WaFQBKoF0mftuqren/WWfOQRoCVosOC4UsMh27dBFxwAKU1UnBwFYLUX+nFdWaV08RT97avmk4ZePH4LLVXsjt00NvacicLuWGOIAiTuEWnXjjRrZ3Jb2JthipcLI7i3E879ReCmHkRAJB6QftiudlJfXornlD8FGwYvdD29djtSVbOMxn30w2bubr8qDXbnjbo9Pmy4EnmMnaChVLMN5V3/8GjFkb2aeWzeBqQQkHg6hOMqLP1LoBejITCBDtU0LdFnh+N+zFRCiL/3ndUnRpK8OIcnpmIBLnOiYh+I8h2/t3n1Vtx94QHxJISau7VhSRrG8dHspjm20vnd1hrAzHGwmFprLvJs0M57FpH+TFTEcpl5ghBR9kgsvXk9j6zW93l1lgnlDdK8RGryt8bRGR3O0SEodss3gYdN/XK3c3MyX5GvdGzo5/SH+rNbgcJVli61WI5fuax381Gg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(376002)(366004)(39860400002)(346002)(396003)(451199024)(186009)(1800799009)(36756003)(26005)(41300700001)(5660300002)(83380400001)(86362001)(7416002)(8936002)(4326008)(8676002)(6506007)(6666004)(6486002)(1076003)(6512007)(2616005)(478600001)(2906002)(38100700002)(66946007)(966005)(316002)(66476007)(66556008)(54906003)(6916009);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2nc45UjYNQrRv/jslnget6h2cVDhwJx2Vrh3NkdeEe5n1tmXZ9JJVYrP0xypqEdoL+mhmoONOeXo/tlKre/Cga8TgQqE3ps9uklbwt3fXQxDQqv7eHCLPNBdkW6IMnxwj08YaFF502za/MltSMG9RLUX0sEQdJwpa0mVOEmUB3D1bEsQzzgu/rY2JE/ijGdR/2MmN9VWH4DwuF99PVOUVdEi0ipsoLOcbeQllDeNr4w+GC2kOL8cWRRErte2Ne7n+2V6SxLnlMqyHcIHTsWtTWLrAV1h+SZ0fs7i4g7kh4p52MkY2yCuaC6cG/xgOwanlhFvoC1JiACKA2x/m/R3RWTVuGyvIgpcZebrIFWclPUw5b1oZpfWGjXJbkwh4cl7mY0bdyqBhOllDTi1HyTK4MA6iqVvx182G+0dKUR0bUJrQ1IpVtXIsgL/VD9lO/YMpDrHJJLZs6FnZCra3LCDw+n4T6kel+gaz3MtgELSN2T5Z74IpYojzCy4jFqapABkrWFR3z+7xPAsXdNg+5WcJbGaWHy89e3iBtJzjzp+o/ZqXn1mM0YbFFWfpO4O/TMMApY3itF3n31M7Gq2oguWx6z5WLSWp4H370WHVyXT0LyJ+DOjS9i1TPZ37Pjz4Pgo18D1snyjDJUK7ntGDe+I7WUmThpnSRometRqx2GEeSwUbaur1g0maDlyKxuUIw9dHTZIwlm1XQAkYM0EhXVlTb2pGVX4v2ZT4zP5Qz004ArzyinjLw6lQ/gTDLEl44QV0QnOPz/Gr4n2QBvk4q3IHx96eb088Mzb/S6T0DE7UH+g9cUr8TZzU2aQ6RC+Hwnv5heptGdZM9vNXHbNZRIVgriVmPoXgNn7c0xNPhoacLvIdZFqU3mKyNu9LI6M3+kfSjJ5//CYMKeAshznKUMeq3cQhN4u/FoEHpp+TFjEXmIl3EWWtDljc1+VxApNEmUzKphp2r07roqbVJ55PPuWfvL9He6hyaHgf39gi9mjcMbTCM+gOM4pNod3P0vcYQ0CaoWTgfswE3ro2IDzQoFkMkgd0bzd2xOa3/fycHyBJRu/weku3Cp8Qk+8gBJ8pZzUSPHhKKjavXDiUC6tNMJVpGU7V586VECwNMWRFJ7BDIwMdnbMcVlLGEpm41hFz13q+0pNaX1um/HS+wGWPHMuklvz7HTBm5MxVqC4ZxWGDrZgZAiZmbyKd4W9t/mKgF12IVrrV49ndpPTHPqNfHlBHftQEhy9koI57+Q80RXIeDH/bRK+EQnIvmBty+dyAyFeLxJopc1XVwqjMpBWq6unDNvQOeCaEahdmVxID2FAgy9bUY1sWWqGreEfttNBKThvj3iPrKHqqIv200XvytEZBrDaRzTwExOtStpPHBYIc/rlmWBmBU2tVIg5IzNGk5RMe5ordlZVPfv5gO8bQNNGZyCEo3rapD3iHRzPhBBb/Y9L8TVcgGf9RejK6c+pfxtRl9pgqhqFlO5g7VlxF+CIc/FlA/fltT3nevRnamG6Dt3TvGM7rGx2LtR/Ac5bY1FVRt7IOaPfd6pUuP5BjJd49jM9yF5trjmN4vsYSn76C1H3LmyN8H+mki/VBglcrJtU X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: qAHsezrRb3sbYBombWOD7B+Qka9op+Rs3rWNcJzJqM8OgBLwM8/oKbrbmWIySuzpQUbEZmEd067CYymm21TKdWBNPSqXc+/+su+Z8jH0wkI8iwnC62+OnqTrPlCvXCIU+JtQrU9KDeUJki06380B4tvMKCVV+Ia016ePS7+cBA4zm7kB8hkpcmwySnWJsmMiQPwdxoXWHSuiJHNnALWCxtUvKeXAwqOcl4XTYHTmlQ4NEouGYngLqB64qvcCB30+aPo15VBKPJYJQS8I8qzGYw81n4pUMAcoPJqEPQhWDTi7PlraELzwTczHYEumysIinRZD1odOL6JrcdbdjP0mAV3zTsGCrdBRY9JLdwYJCvN2FCFWWBwKtfDaDUr0qaJ21sGJCrvNerBDFmTD1CT4AM8HBGsuTkvFFCGELBCjY3CCmo3bcNUp9hOivFaqQtidflJGJSqA7WET7qBkSKW4CBjCoWPQq+nMK9FU8T254K5XbR3FbIojmxac1Zk/XotDTrTpfJrQiOh5QQzOgU2eAY7MJGyn2V9ZUO38wJe/zH/z5WGHzgpvte9l4UkOQwvF6E6R3ISG9EI0fcsEgQ+bfgt+nx18tOxvACxX2qxNrgdGNNBqJ4QZQeN1oNNO/5gJMrW9LtZkR/sH1hJS7mBXwQjj09ohVUWa393Mk1pKEdJ65fY557OjxybL4947BXhaK42Fx3CKutR45QrkjnEevxGrx6wOU1rZrSjSDW6+eZkTNCEUAOdX1au/bvealiHsn+QWbv3V/nL9JvdOVL5GEDI3hq8nwJ9FwmENniIWJAKzBmyO2IoqH8z9BTcLzhveopzTBDT+4AQcgd3Oxhyr9h4fBQSi1YJcQrwi23Zs597yq7uWaXHmnBRyC1sU2XgGSzE5koemPilkJov43bgzyQgmg73Fpmx43QCsSzLfpp72NDP1Wgpc3WbowLSAJbb4PN6VEG5ov/WBOy5uClDnd2DFRuUj15NzeUPIKImEPUuBb2uPBpRHFGWJw4veYdpuZOxj9xb0WHb7SSf53IOK+f4sccJTt1NtXBW+yHOqrRadkFWVv999h+1WLhD5QkZLo7lP7qtoId1LFVeFSU8RN3CLhgGs5Gd1/Z+0U/IVzqOwtdhGBMXL375rnn+vGCBFXevhVfvKFEwe1333R2QlJg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23891183-d736-4095-4e22-08dbb3f46016 X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2023 00:57:17.0013 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6M3dal/qulKHzgMQq9YYlpMDSUT0KA7bVi5XPO7R0NP7biyVOzklF8oVhGrpZj3nVspoLc0cWd64SD3wQiIdLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4307 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-12_24,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309130005 X-Proofpoint-ORIG-GUID: lnR2a977wBTVpPtcCl7DyIVTPEpjkI_s X-Proofpoint-GUID: lnR2a977wBTVpPtcCl7DyIVTPEpjkI_s Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 17:58:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776922043362822336 X-GMAIL-MSGID: 1776995616988478322 |
Series |
init/main: Clear boot task idle flag
|
|
Commit Message
Liam R. Howlett
Sept. 13, 2023, 12:56 a.m. UTC
Initial booting is setting the task flag to idle (PF_IDLE) by the call
path sched_init() -> init_idle(). Having the task idle and calling
call_rcu() in kernel/rcu/tiny.c means that TIF_NEED_RESCHED will be
set. Subsequent calls to any cond_resched() will enable IRQs,
potentially earlier than the IRQ setup has completed. Recent changes
have caused just this scenario and IRQs have been enabled early.
This causes a warning later in start_kernel() as interrupts are enabled
before they are fully set up.
Fix this issue by clearing the PF_IDLE flag on return from sched_init()
and restore the flag in rest_init(). Although the boot task was marked
as idle since (at least) d80e4fda576d, I am not sure that it is wrong to
do so. The forced context-switch on idle task was introduced in the
tiny_rcu update, so I'm going to claim this fixes 5f6130fa52ee.
Link: https://lore.kernel.org/linux-mm/87v8cv22jh.fsf@mail.lhotse/
Link: https://lore.kernel.org/linux-mm/CAMuHMdWpvpWoDa=Ox-do92czYRvkok6_x6pYUH+ZouMcJbXy+Q@mail.gmail.com/
Fixes: 5f6130fa52ee ("tiny_rcu: Directly force QS when call_rcu_[bh|sched]() on idle_task")
Cc: stable@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Peng Zhang <zhangpeng.00@bytedance.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Mike Rapoport (IBM)" <rppt@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
init/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On Wed, Sep 13, 2023 at 01:32:38PM -0400, Liam R. Howlett wrote: > * Peter Zijlstra <peterz@infradead.org> [230913 12:13]: > > On Wed, Sep 13, 2023 at 10:51:25AM -0400, Liam R. Howlett wrote: > > > * Peter Zijlstra <peterz@infradead.org> [230913 09:53]: > > > > On Tue, Sep 12, 2023 at 08:56:47PM -0400, Liam R. Howlett wrote: > > > > > > > > > diff --git a/init/main.c b/init/main.c > > > > > index ad920fac325c..f74772acf612 100644 > > > > > --- a/init/main.c > > > > > +++ b/init/main.c > > > > > @@ -696,7 +696,7 @@ noinline void __ref __noreturn rest_init(void) > > > > > */ > > > > > rcu_read_lock(); > > > > > tsk = find_task_by_pid_ns(pid, &init_pid_ns); > > > > > - tsk->flags |= PF_NO_SETAFFINITY; > > > > > + tsk->flags |= PF_NO_SETAFFINITY | PF_IDLE; > > > > > set_cpus_allowed_ptr(tsk, cpumask_of(smp_processor_id())); > > > > > rcu_read_unlock(); > > > > > > > > > > > > > Hmm, isn't that pid-1 you're setting PF_IDLE on? > > > > > > Yes, thanks. I think that is what Geert is hitting with my patch. > > > > > > debug __might_resched() in kernel/sched/core.c is failing to return in > > > that first (complex) if statement. His report says pid 1 so this is > > > likely the issue. > > > > > > > > > > > The task becoming idle is 'current' at this point, see the > > > > cpu_startup_entry() call below. > > > > > > > > Would not something like so be the right thing? > > > > > > > > > > > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > > > > index 2299a5cfbfb9..802551e0009b 100644 > > > > --- a/kernel/sched/core.c > > > > +++ b/kernel/sched/core.c > > > > @@ -9269,7 +9269,7 @@ void __init init_idle(struct task_struct *idle, int cpu) > > > > * PF_KTHREAD should already be set at this point; regardless, make it > > > > * look like a proper per-CPU kthread. > > > > */ > > > > - idle->flags |= PF_IDLE | PF_KTHREAD | PF_NO_SETAFFINITY; > > > > + idle->flags |= PF_KTHREAD | PF_NO_SETAFFINITY; > > > > > > I am concerned this will alter more than just the current task, which > > > would mean more modifications later. There is a comment about it being > > > called 'more than once' and 'per cpu' so I am hesitant to change the > > > function itself. > > > > > > Although I am unsure of the call path.. fork_idle() -> init_idle() I > > > guess? > > > > There's only 2 ways to get into do_idle(), through cpu_startup_entry() > > and play_idle_precise(). The latter already frobs PF_IDLE since it is > > the forced idle path, this then leaves cpu_startup_entry() which is the > > regular idle path. > > > > All idle threads will end up calling into it, the boot CPU through the > > rest_init() and the SMP cpus through arch SMP bringup. > > > > IOW, this ensures all idle loops will have PF_IDLE set but not the > > pre-idle loop setup code these threads run. > > Thanks for the information. This does leave the init_idle() function in > the odd state of not setting PF_IDLE, but I guess that's okay? Yep, the few things that care about PF_IDLE seem to really only care about do_idle() and very much not (per the rcutiny thing) any code that comes before it.
Hello, kernel test robot noticed "BUG:sleeping_function_called_from_invalid_context_at_kernel/sched/completion.c" on: commit: afa19b70494c22ba27224f90c0805e88e5db41e1 ("[PATCH] init/main: Clear boot task idle flag") url: https://github.com/intel-lab-lkp/linux/commits/Liam-R-Howlett/init-main-Clear-boot-task-idle-flag/20230913-085921 base: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git 3669558bdf354cd352be955ef2764cde6a9bf5ec patch link: https://lore.kernel.org/all/20230913005647.1534747-1-Liam.Howlett@oracle.com/ patch subject: [PATCH] init/main: Clear boot task idle flag in testcase: boot compiler: gcc-12 test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G (please refer to attached dmesg/kmsg for entire log/backtrace) besides BUG:sleeping_function_called_from_invalid_context_at_kernel/sched/completion.c, we also observed other issues on this commit but clean on parent: 3669558bdf354cd3 afa19b70494c22ba27224f90c08 ---------------- --------------------------- fail:runs %reproduction fail:runs | | | :6 17% 1:6 dmesg.BUG:sleeping_function_called_from_invalid_context_at_drivers/dma-buf/selftest.c :6 17% 1:6 dmesg.BUG:sleeping_function_called_from_invalid_context_at_drivers/net/ethernet/intel/e1000_hw.c :6 100% 6:6 dmesg.BUG:sleeping_function_called_from_invalid_context_at_include/linux/sched/mm.h :6 83% 5:6 dmesg.BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/mutex.c :6 50% 3:6 dmesg.BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/rwsem.c :6 17% 1:6 dmesg.BUG:sleeping_function_called_from_invalid_context_at_kernel/rcu/tree.c :6 100% 6:6 dmesg.BUG:sleeping_function_called_from_invalid_context_at_kernel/sched/completion.c :6 100% 6:6 dmesg.RIP:__do_softirq :6 100% 6:6 dmesg.RIP:__flush_smp_call_function_queue :6 33% 2:6 dmesg.RIP:__handle_irq_event_percpu :6 100% 6:6 dmesg.RIP:__hrtimer_run_queues :6 100% 6:6 dmesg.RIP:__note_gp_changes :6 100% 6:6 dmesg.RIP:__queue_work :6 100% 6:6 dmesg.RIP:__raise_softirq_irqoff :6 100% 6:6 dmesg.RIP:__run_timers :6 100% 6:6 dmesg.RIP:__smp_call_single_queue :6 100% 6:6 dmesg.RIP:__sysvec_apic_timer_interrupt :6 100% 6:6 dmesg.RIP:__sysvec_call_function_single :6 50% 3:6 dmesg.RIP:__update_load_avg_blocked_se :6 100% 6:6 dmesg.RIP:__update_load_avg_cfs_rq :6 100% 6:6 dmesg.RIP:__update_load_avg_se :6 100% 6:6 dmesg.RIP:__wake_nocb_gp :6 67% 4:6 dmesg.RIP:_raw_spin_unlock_irqrestore :6 100% 6:6 dmesg.RIP:arch_ftrace_ops_list_func :6 100% 6:6 dmesg.RIP:attach_entity_load_avg :6 100% 6:6 dmesg.RIP:call_timer_fn :6 100% 6:6 dmesg.RIP:default_idle :6 100% 6:6 dmesg.RIP:dequeue_task_fair :6 100% 6:6 dmesg.RIP:detach_entity_load_avg :6 33% 2:6 dmesg.RIP:detach_if_pending :6 67% 4:6 dmesg.RIP:dma_fence_signal_timestamp_locked :6 33% 2:6 dmesg.RIP:do_nocb_deferred_wakeup :6 100% 6:6 dmesg.RIP:do_nocb_deferred_wakeup_timer :6 100% 6:6 dmesg.RIP:enqueue_hrtimer :6 100% 6:6 dmesg.RIP:enqueue_task_fair :6 100% 6:6 dmesg.RIP:enqueue_timer :6 17% 1:6 dmesg.RIP:hrtimer_init :6 67% 4:6 dmesg.RIP:load_balance :6 100% 6:6 dmesg.RIP:lock_acquire :6 100% 6:6 dmesg.RIP:lock_acquired :6 100% 6:6 dmesg.RIP:lock_contended :6 100% 6:6 dmesg.RIP:lock_release :6 33% 2:6 dmesg.RIP:printk_sprint :6 17% 1:6 dmesg.RIP:rcu_barrier_trace :6 100% 6:6 dmesg.RIP:rcu_core :6 100% 6:6 dmesg.RIP:rcu_is_cpu_rrupt_from_idle :6 83% 5:6 dmesg.RIP:rcu_qs :6 100% 6:6 dmesg.RIP:rcu_report_qs_rnp :6 100% 6:6 dmesg.RIP:rcu_sched_clock_irq :6 50% 3:6 dmesg.RIP:resched_curr :6 100% 6:6 dmesg.RIP:set_task_cpu :6 100% 6:6 dmesg.RIP:trace_hardirqs_off :6 100% 6:6 dmesg.RIP:trace_hardirqs_off_finish :6 100% 6:6 dmesg.RIP:trace_hardirqs_on :6 100% 6:6 dmesg.RIP:trace_reschedule_entry :6 100% 6:6 dmesg.RIP:trace_reschedule_exit :6 100% 6:6 dmesg.RIP:try_to_wake_up :6 100% 6:6 dmesg.RIP:ttwu_do_activate :6 100% 6:6 dmesg.RIP:update_cpu_capacity :6 100% 6:6 dmesg.RIP:update_curr :6 100% 6:6 dmesg.RIP:update_dl_rq_load_avg :6 100% 6:6 dmesg.RIP:update_irq_load_avg :6 100% 6:6 dmesg.RIP:update_rt_rq_load_avg :6 100% 6:6 dmesg.RIP:update_sd_lb_stats :6 17% 1:6 dmesg.RIP:wake_up_nohz_cpu :6 100% 6:6 dmesg.WARNING:at_arch/x86/include/asm/trace/irq_vectors.h:#__sysvec_apic_timer_interrupt :6 100% 6:6 dmesg.WARNING:at_arch/x86/include/asm/trace/irq_vectors.h:#__sysvec_call_function_single :6 100% 6:6 dmesg.WARNING:at_arch/x86/include/asm/trace/irq_vectors.h:#trace_reschedule_entry :6 100% 6:6 dmesg.WARNING:at_arch/x86/include/asm/trace/irq_vectors.h:#trace_reschedule_exit :6 100% 6:6 dmesg.WARNING:at_include/linux/trace_recursion.h:#arch_ftrace_ops_list_func :6 100% 6:6 dmesg.WARNING:at_include/trace/events/csd.h:#__flush_smp_call_function_queue :6 67% 4:6 dmesg.WARNING:at_include/trace/events/dma_fence.h:#dma_fence_signal_timestamp_locked :6 100% 6:6 dmesg.WARNING:at_include/trace/events/ipi.h:#__smp_call_single_queue :6 50% 3:6 dmesg.WARNING:at_include/trace/events/ipi.h:#resched_curr :6 17% 1:6 dmesg.WARNING:at_include/trace/events/ipi.h:#wake_up_nohz_cpu :6 100% 6:6 dmesg.WARNING:at_include/trace/events/irq.h:#__do_softirq :6 33% 2:6 dmesg.WARNING:at_include/trace/events/irq.h:#__handle_irq_event_percpu :6 100% 6:6 dmesg.WARNING:at_include/trace/events/irq.h:#__raise_softirq_irqoff :6 100% 6:6 dmesg.WARNING:at_include/trace/events/lock.h:#lock_acquire :6 100% 6:6 dmesg.WARNING:at_include/trace/events/lock.h:#lock_acquired :6 100% 6:6 dmesg.WARNING:at_include/trace/events/lock.h:#lock_contended :6 100% 6:6 dmesg.WARNING:at_include/trace/events/lock.h:#lock_release :6 100% 6:6 dmesg.WARNING:at_include/trace/events/preemptirq.h:#trace_hardirqs_off :6 100% 6:6 dmesg.WARNING:at_include/trace/events/preemptirq.h:#trace_hardirqs_off_finish :6 100% 6:6 dmesg.WARNING:at_include/trace/events/preemptirq.h:#trace_hardirqs_on :6 33% 2:6 dmesg.WARNING:at_include/trace/events/printk.h:#printk_sprint :6 100% 6:6 dmesg.WARNING:at_include/trace/events/rcu.h:#__note_gp_changes :6 100% 6:6 dmesg.WARNING:at_include/trace/events/rcu.h:#__wake_nocb_gp :6 33% 2:6 dmesg.WARNING:at_include/trace/events/rcu.h:#do_nocb_deferred_wakeup :6 100% 6:6 dmesg.WARNING:at_include/trace/events/rcu.h:#do_nocb_deferred_wakeup_timer :6 17% 1:6 dmesg.WARNING:at_include/trace/events/rcu.h:#rcu_barrier_trace :6 100% 6:6 dmesg.WARNING:at_include/trace/events/rcu.h:#rcu_core :6 83% 5:6 dmesg.WARNING:at_include/trace/events/rcu.h:#rcu_qs :6 100% 6:6 dmesg.WARNING:at_include/trace/events/rcu.h:#rcu_report_qs_rnp :6 100% 6:6 dmesg.WARNING:at_include/trace/events/rcu.h:#rcu_sched_clock_irq :6 50% 3:6 dmesg.WARNING:at_include/trace/events/sched.h:#__update_load_avg_blocked_se :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#__update_load_avg_cfs_rq :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#__update_load_avg_se :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#attach_entity_load_avg :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#dequeue_task_fair :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#detach_entity_load_avg :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#enqueue_task_fair :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#set_task_cpu :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#try_to_wake_up :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#ttwu_do_activate :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#update_cpu_capacity :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#update_curr :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#update_dl_rq_load_avg :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#update_irq_load_avg :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#update_rt_rq_load_avg :6 100% 6:6 dmesg.WARNING:at_include/trace/events/sched.h:#update_sd_lb_stats :6 100% 6:6 dmesg.WARNING:at_include/trace/events/timer.h:#__hrtimer_run_queues :6 100% 6:6 dmesg.WARNING:at_include/trace/events/timer.h:#__run_timers :6 100% 6:6 dmesg.WARNING:at_include/trace/events/timer.h:#call_timer_fn :6 33% 2:6 dmesg.WARNING:at_include/trace/events/timer.h:#detach_if_pending :6 100% 6:6 dmesg.WARNING:at_include/trace/events/timer.h:#enqueue_hrtimer :6 100% 6:6 dmesg.WARNING:at_include/trace/events/timer.h:#enqueue_timer :6 17% 1:6 dmesg.WARNING:at_include/trace/events/timer.h:#hrtimer_init :6 100% 6:6 dmesg.WARNING:at_include/trace/events/workqueue.h:#__queue_work :6 100% 6:6 dmesg.WARNING:at_kernel/rcu/tree.c:#rcu_is_cpu_rrupt_from_idle :6 17% 1:6 dmesg.WARNING:inconsistent_lock_state :6 100% 6:6 dmesg.WARNING:suspicious_RCU_usage :6 33% 2:6 dmesg.arch/x86/kernel/irq.c:#IRQ_failed_to_wake_up_RCU :6 100% 6:6 dmesg.include/linux/cgroup.h:#suspicious_rcu_dereference_check()usage :6 100% 6:6 dmesg.include/linux/rcupdate.h:#rcu_read_lock()used_illegally_while_idle :6 100% 6:6 dmesg.include/linux/rcupdate.h:#rcu_read_unlock()used_illegally_while_idle :6 17% 1:6 dmesg.inconsistent{IN-HARDIRQ-W}->{HARDIRQ-ON-W}usage :6 100% 6:6 dmesg.kernel/events/core.c:#suspicious_rcu_dereference_check()usage :6 83% 5:6 dmesg.kernel/exit.c:#suspicious_rcu_dereference_check()usage :6 100% 6:6 dmesg.kernel/rcu/tree.c:#RCU_dynticks_nmi_nesting_counter_underflow/zero :6 67% 4:6 dmesg.kernel/sched/core.c:#suspicious_rcu_dereference_check()usage :6 100% 6:6 dmesg.kernel/sched/fair.c:#suspicious_rcu_dereference_check()usage :6 83% 5:6 dmesg.kernel/workqueue.c:#RCU_or_wq_pool_mutex_should_be_held :6 83% 5:6 dmesg.kernel/workqueue.c:#suspicious_rcu_dereference_check()usage If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <oliver.sang@intel.com> | Closes: https://lore.kernel.org/oe-lkp/202309142334.a345320b-oliver.sang@intel.com [ 2.318233][ T1] BUG: sleeping function called from invalid context at kernel/sched/completion.c:111 [ 2.318647][ T1] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1, name: swapper/0 [ 2.319725][ T1] preempt_count: 0, expected: 0 [ 2.320293][ T1] no locks held by swapper/0/1. [ 2.320882][ T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.0-rc1-00034-gafa19b70494c #1 [ 2.321957][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [ 2.321957][ T1] Call Trace: [ 2.321957][ T1] <TASK> [ 2.321957][ T1] dump_stack_lvl (lib/dump_stack.c:107) [ 2.321957][ T1] __might_resched (kernel/sched/core.c:10188) [ 2.321957][ T1] ? sched_core_find (kernel/sched/core.c:10142) [ 2.321957][ T1] __wait_for_common (kernel/sched/completion.c:115) [ 2.321957][ T1] ? usleep_range_state (kernel/time/timer.c:2129) [ 2.321957][ T1] ? reacquire_held_locks (kernel/locking/lockdep.c:5404) [ 2.321957][ T1] ? wait_for_completion_io_timeout (kernel/sched/completion.c:110) [ 2.321957][ T1] ? do_raw_spin_lock (kernel/locking/spinlock_debug.c:121) [ 2.321957][ T1] ? rest_init (init/main.c:1431) [ 2.321957][ T1] kernel_init (init/main.c:1439) [ 2.321957][ T1] ? _raw_spin_unlock_irq (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:77 include/linux/spinlock_api_smp.h:159 kernel/locking/spinlock.c:202) [ 2.321957][ T1] ret_from_fork (arch/x86/kernel/process.c:153) [ 2.321957][ T1] ? rest_init (init/main.c:1431) [ 2.321957][ T1] ret_from_fork_asm (arch/x86/entry/entry_64.S:312) [ 2.321957][ T1] </TASK> [ 2.322276][ T1] smpboot: CPU0: Intel Xeon E312xx (Sandy Bridge) (family: 0x6, model: 0x2a, stepping: 0x1) [ 2.327212][ T1] RCU Tasks: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1. [ 2.328461][ T1] RCU Tasks Rude: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1. [ 2.330045][ T1] RCU Tasks Trace: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1. [ 2.331385][ T1] Running RCU-tasks wait API self tests [ 2.333117][ T1] Performance Events: unsupported p6 CPU model 42 no PMU driver, software events only. [ 2.334654][ T1] signal: max sigframe size: 1776 [ 2.335915][ T1] rcu: Hierarchical SRCU implementation. [ 2.336653][ T1] rcu: Max phase no-delay instances is 1000. [ 2.342550][ T14] Callback from call_rcu_tasks_trace() invoked. [ 2.344299][ T1] smp: Bringing up secondary CPUs ... [ 2.347251][ T1] smpboot: x86: Booting SMP configuration: [ 2.347999][ T1] .... node #0, CPUs: #1 [ 0.487313][ T0] masked ExtINT on CPU#1 [ 2.348624][ T0] ------------[ cut here ]------------ [ 2.348624][ T0] WARNING: CPU: 0 PID: 0 at include/trace/events/preemptirq.h:36 trace_hardirqs_off_finish (include/trace/events/preemptirq.h:36 include/trace/events/preemptirq.h:36 kernel/trace/trace_preemptirq.c:78 kernel/trace/trace_preemptirq.c:73) [ 2.348624][ T0] Modules linked in: [ 2.348624][ T0] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.6.0-rc1-00034-gafa19b70494c #1 [ 2.348624][ T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [ 2.348624][ T0] RIP: 0010:trace_hardirqs_off_finish (include/trace/events/preemptirq.h:36 include/trace/events/preemptirq.h:36 kernel/trace/trace_preemptirq.c:78 kernel/trace/trace_preemptirq.c:73) [ 2.348624][ T0] Code: 03 80 3c 02 00 75 2a 48 8b 7b 08 31 d2 48 89 ee e8 99 f4 ff ff 65 ff 0d 0a 69 ce 7e e9 5d ff ff ff e8 38 18 e9 ff 84 c0 75 80 <0f> 0b e9 79 ff ff ff e8 c8 c0 3a 00 eb cf 66 0f 1f 44 00 00 65 8b All code ======== 0: 03 80 3c 02 00 75 add 0x7500023c(%rax),%eax 6: 2a 48 8b sub -0x75(%rax),%cl 9: 7b 08 jnp 0x13 b: 31 d2 xor %edx,%edx d: 48 89 ee mov %rbp,%rsi 10: e8 99 f4 ff ff call 0xfffffffffffff4ae 15: 65 ff 0d 0a 69 ce 7e decl %gs:0x7ece690a(%rip) # 0x7ece6926 1c: e9 5d ff ff ff jmp 0xffffffffffffff7e 21: e8 38 18 e9 ff call 0xffffffffffe9185e 26: 84 c0 test %al,%al 28: 75 80 jne 0xffffffffffffffaa 2a:* 0f 0b ud2 <-- trapping instruction 2c: e9 79 ff ff ff jmp 0xffffffffffffffaa 31: e8 c8 c0 3a 00 call 0x3ac0fe 36: eb cf jmp 0x7 38: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 3e: 65 gs 3f: 8b .byte 0x8b Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: e9 79 ff ff ff jmp 0xffffffffffffff80 7: e8 c8 c0 3a 00 call 0x3ac0d4 c: eb cf jmp 0xffffffffffffffdd e: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 14: 65 gs 15: 8b .byte 0x8b [ 2.348624][ T0] RSP: 0000:ffffffff84a07d60 EFLAGS: 00010046 [ 2.348624][ T0] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff81513ac2 [ 2.348624][ T0] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff85a79540 [ 2.348624][ T0] RBP: ffffffff8352c418 R08: 0000000000000000 R09: fffffbfff0b4f2a8 [ 2.348624][ T0] R10: ffffffff85a79547 R11: 0000000000000000 R12: 0000000000000000 [ 2.348624][ T0] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 2.348624][ T0] FS: 0000000000000000(0000) GS:ffff8883aea00000(0000) knlGS:0000000000000000 [ 2.348624][ T0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2.348624][ T0] CR2: ffff88843ffff000 CR3: 0000000004a89000 CR4: 00000000000406f0 [ 2.348624][ T0] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2.348624][ T0] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2.348624][ T0] Call Trace: [ 2.348624][ T0] <TASK> [ 2.348624][ T0] ? __warn (kernel/panic.c:673) [ 2.348624][ T0] ? trace_hardirqs_off_finish (include/trace/events/preemptirq.h:36 include/trace/events/preemptirq.h:36 kernel/trace/trace_preemptirq.c:78 kernel/trace/trace_preemptirq.c:73) [ 2.348624][ T0] ? report_bug (lib/bug.c:180 lib/bug.c:219) [ 2.348624][ T0] ? handle_bug (arch/x86/kernel/traps.c:237) [ 2.348624][ T0] ? exc_invalid_op (arch/x86/kernel/traps.c:258 (discriminator 1)) [ 2.348624][ T0] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:568) [ 2.348624][ T0] ? irqentry_enter (kernel/entry/common.c:315) [ 2.348624][ T0] ? trace_hardirqs_off_finish (arch/x86/include/asm/bitops.h:228 arch/x86/include/asm/bitops.h:240 include/asm-generic/bitops/instrumented-non-atomic.h:142 include/linux/cpumask.h:504 include/linux/cpumask.h:1082 include/trace/events/preemptirq.h:36 kernel/trace/trace_preemptirq.c:78 kernel/trace/trace_preemptirq.c:73) [ 2.348624][ T0] ? trace_hardirqs_off_finish (include/trace/events/preemptirq.h:36 include/trace/events/preemptirq.h:36 kernel/trace/trace_preemptirq.c:78 kernel/trace/trace_preemptirq.c:73) [ 2.348624][ T0] irqentry_enter (kernel/entry/common.c:315) [ 2.348624][ T0] sysvec_call_function_single (arch/x86/kernel/smp.c:287) [ 2.348624][ T0] asm_sysvec_call_function_single (arch/x86/include/asm/idtentry.h:652) [ 2.348624][ T0] RIP: 0010:default_idle (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:72 arch/x86/kernel/process.c:750) [ 2.348624][ T0] Code: 07 76 e7 48 89 07 49 c7 c0 08 00 00 00 4d 29 c8 4c 01 c7 4c 29 c2 e9 72 ff ff ff cc cc cc cc eb 07 0f 00 2d 37 79 30 00 fb f4 <fa> c3 0f 1f 00 65 48 8b 04 25 40 a4 1f 00 f0 80 48 02 20 48 8b 10 All code ======== 0: 07 (bad) 1: 76 e7 jbe 0xffffffffffffffea 3: 48 89 07 mov %rax,(%rdi) 6: 49 c7 c0 08 00 00 00 mov $0x8,%r8 d: 4d 29 c8 sub %r9,%r8 10: 4c 01 c7 add %r8,%rdi 13: 4c 29 c2 sub %r8,%rdx 16: e9 72 ff ff ff jmp 0xffffffffffffff8d 1b: cc int3 1c: cc int3 1d: cc int3 1e: cc int3 1f: eb 07 jmp 0x28 21: 0f 00 2d 37 79 30 00 verw 0x307937(%rip) # 0x30795f 28: fb sti 29: f4 hlt 2a:* fa cli <-- trapping instruction 2b: c3 ret 2c: 0f 1f 00 nopl (%rax) 2f: 65 48 8b 04 25 40 a4 mov %gs:0x1fa440,%rax 36: 1f 00 38: f0 80 48 02 20 lock orb $0x20,0x2(%rax) 3d: 48 8b 10 mov (%rax),%rdx Code starting with the faulting instruction =========================================== 0: fa cli 1: c3 ret 2: 0f 1f 00 nopl (%rax) 5: 65 48 8b 04 25 40 a4 mov %gs:0x1fa440,%rax c: 1f 00 e: f0 80 48 02 20 lock orb $0x20,0x2(%rax) 13: 48 8b 10 mov (%rax),%rdx [ 2.348624][ T0] RSP: 0000:ffffffff84a07e40 EFLAGS: 00000206 [ 2.348624][ T0] RAX: 0000000000003056 RBX: 0000000000000000 RCX: ffffffff8352c7ba [ 2.348624][ T0] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff812e3bd3 [ 2.348624][ T0] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed1075d7ed9d [ 2.348624][ T0] R10: ffff8883aebf6ceb R11: 0000000000000000 R12: 1ffffffff0940fca [ 2.348624][ T0] R13: ffffffff84a1e940 R14: dffffc0000000000 R15: 0000000000013f10 [ 2.348624][ T0] ? ct_kernel_exit+0xca/0x100 [ 2.348624][ T0] ? cpuidle_idle_call (kernel/sched/idle.c:171) [ 2.348624][ T0] default_idle_call (include/linux/cpuidle.h:143 kernel/sched/idle.c:98) [ 2.348624][ T0] cpuidle_idle_call (kernel/sched/idle.c:171) [ 2.348624][ T0] ? arch_cpu_idle_exit+0x30/0x30 [ 2.348624][ T0] ? lockdep_hardirqs_on_prepare (kernel/locking/lockdep.c:4565) [ 2.348624][ T0] do_idle (kernel/sched/idle.c:282) [ 2.348624][ T0] cpu_startup_entry (kernel/sched/idle.c:378 (discriminator 1)) [ 2.348624][ T0] rest_init (include/linux/rcupdate.h:750 init/main.c:697) [ 2.348624][ T0] arch_call_rest_init+0xf/0x20 [ 2.348624][ T0] start_kernel (init/main.c:1021 (discriminator 1)) [ 2.348624][ T0] x86_64_start_reservations (arch/x86/kernel/head64.c:544) [ 2.348624][ T0] x86_64_start_kernel (??:?) [ 2.348624][ T0] secondary_startup_64_no_verify (arch/x86/kernel/head_64.S:433) [ 2.348624][ T0] </TASK> [ 2.348624][ T0] irq event stamp: 12375 [ 2.348624][ T0] hardirqs last enabled at (12374): cpuidle_idle_call (kernel/sched/idle.c:171) [ 2.348624][ T0] hardirqs last disabled at (12375): sysvec_call_function_single (arch/x86/kernel/smp.c:287) [ 2.348624][ T0] softirqs last enabled at (8563): __do_softirq (arch/x86/include/asm/preempt.h:27 kernel/softirq.c:400 kernel/softirq.c:582) [ 2.348624][ T0] softirqs last disabled at (8558): __irq_exit_rcu (kernel/softirq.c:427 kernel/softirq.c:632) [ 2.348624][ T0] ---[ end trace 0000000000000000 ]--- The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20230914/202309142334.a345320b-oliver.sang@intel.com
diff --git a/init/main.c b/init/main.c index ad920fac325c..f74772acf612 100644 --- a/init/main.c +++ b/init/main.c @@ -696,7 +696,7 @@ noinline void __ref __noreturn rest_init(void) */ rcu_read_lock(); tsk = find_task_by_pid_ns(pid, &init_pid_ns); - tsk->flags |= PF_NO_SETAFFINITY; + tsk->flags |= PF_NO_SETAFFINITY | PF_IDLE; set_cpus_allowed_ptr(tsk, cpumask_of(smp_processor_id())); rcu_read_unlock(); @@ -938,6 +938,8 @@ void start_kernel(void) * time - but meanwhile we still have a functioning scheduler. */ sched_init(); + /* Avoid early context switch, rest_init() restores PF_IDLE */ + current->flags &= ~PF_IDLE; if (WARN(!irqs_disabled(), "Interrupts were enabled *very* early, fixing it\n"))