Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp8064276rwn; Wed, 14 Sep 2022 08:26:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR5IezQRkrpXZBva12UOwMLhkvkH0Fvkc3N2foXWAV0+mgnYgVpwxQDnCLOkz6mE9nhyLod+ X-Received: by 2002:a63:904c:0:b0:435:eb3:83da with SMTP id a73-20020a63904c000000b004350eb383damr30082146pge.612.1663169164546; Wed, 14 Sep 2022 08:26:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663169164; cv=pass; d=google.com; s=arc-20160816; b=tuQyV+05N0ZicCULjDwdVhIDOELPuveTY/5LdQHqxY/YhothLc9mB5610YtC64KW5Y wiiX7ObnixjjoiqBYMUkgVGDrbSgo27XQeSlMPxjYwc8M1XHuYzWH83FWq6Y/HYY+S2S meo/QdNLEeZEFC51c+Q6H1Ts47S8aqq/t3Y8twuRQQF48gzhNTWnxcr7DCDz/NjrhXg0 1cwF6HLIjKndNfy5o4ppqvPRgyi83t4Uk2VrATfj4N1c11HVqpZsDNivlFWW2gbZguLX 6pu7kdGhvtP6WIjvnHu1rwiTBJaZXZ0x0kD7ixD1LiaB+BDYTTL+Lfbqs2Gy+a849dpG ta/A== 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; bh=ERrYvNueZ8fSeXzxwlCPF0l8KXoyFKMy82vN+ixONLs=; b=JkNZUAL/ld4BTh/+yqaxpfIbtDfMBkOiS/cEfWL1YaAw/wsKv5G1iU+Ieh1Yn0q1Eu 1lX8G9Xfz13pbunLnhuEP47ZkOyGbX9G7JOJ4SvjKnhLDtjkeTjkO0KECcUjgJWIRNBU kbRc4ow6nW+urnQJpnZEFlLufxYtWdTrrk5K/2ZVgBE5p6DgEKWpa8lyuev9sTHMaT+u X7N+QlOid6D/0KNVQvEFNy3zxNhWAThxUxks3FT3olspZEcFaOTJ8SuzXbVprn/J3Dlx awJom7NOujQaTPgxouFjMG8RqYzquIugaYDtbiSCJDqwadDlXi3f90Dd3USlZJZh2KbP LhFg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=sjx88SRm; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g144-20020a625296000000b00540b367d7c1si14007979pfb.93.2022.09.14.08.25.51; Wed, 14 Sep 2022 08:26:04 -0700 (PDT) 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=@nxp.com header.s=selector2 header.b=sjx88SRm; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230137AbiINOfD (ORCPT + 99 others); Wed, 14 Sep 2022 10:35:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230111AbiINOfB (ORCPT ); Wed, 14 Sep 2022 10:35:01 -0400 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20070.outbound.protection.outlook.com [40.107.2.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0E511BEAC; Wed, 14 Sep 2022 07:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mAqv/l/FeF0/8A67f9u38lSIq1Ta27yUpcb866DEh4Od8NRdTg9ovVEw/jK/yAO8uGwsKzlIcZRqHDF5nm/TtEQxSLfZDShqgY2UzUovWmPH86X4j7nogEMLsAfhHwZGf4+clk5a1f3r2x2cPGR5lOop/jv/ayTCMUZks3pWBe36GlPzWQVHdEXBnj4wDf5z/oj11wU+V4ut6EXtkX6yl3LWj21mnTEqExv+dc2B0EbJpNyYKE4oeHdFH65VUFjRnjZSmIZU4k9kNseTKP26gnmUQxZv9DsJGu9IzvxHUQf7T5KgYngJz0macdImpr8WkawxSxZ5YG3C2bdIJadfxQ== 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=ERrYvNueZ8fSeXzxwlCPF0l8KXoyFKMy82vN+ixONLs=; b=fReKmhnBzB4Y/SRZXKQCfz0n2VN+NXICaJJ0jrMkTGGSF1Sggx3aKWjlLotRur31AF1U/ZepZrDKWYNANQDNHkbVNarLWAKQuRst9vzjLdAFdoGIJqA06hhH/iyH9NoA4HQs0pxGcTuBWGPlBu6LIsmUHAGyYuqUy1eQZiWOYmna9VgbqAqwQzw2HCQA80GnwCeznPN+TykhD0YMdK/4KqzLp/qo+CXuk42dNlqgverRYxD4YlDv1dpYg9Eqn2S2kYNN02tEJmy3Z5lkiTTHF0jX3Onu1+ZF7VDgnivWWI6gjaXoTp9PMVk9ao/JbgFh8myKCtBsuPw5EAzoLXb1aQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ERrYvNueZ8fSeXzxwlCPF0l8KXoyFKMy82vN+ixONLs=; b=sjx88SRmqe3xqZ7IoXOoteFKx73aMYsmT3HwuxYH+uUUT44LG9dDDoJ9jjEqENh63xYik6ady9Xmzpw60zUvKcwlNhw/rbmSRFbX0X1CZDT7QcG2R7fVanwHpQ3zlMFVts0cxjshInNKtumWDrRtuKX/i6TQARCfrWi629bfJCY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by DB8PR04MB6777.eurprd04.prod.outlook.com (2603:10a6:10:11f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Wed, 14 Sep 2022 14:34:57 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::a67a:849c:aeff:cad1]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::a67a:849c:aeff:cad1%7]) with mapi id 15.20.5612.022; Wed, 14 Sep 2022 14:34:57 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: Vinicius Costa Gomes , Jamal Hadi Salim , Cong Wang , Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Voon Weifeng , Vladimir Oltean , Kurt Kanzenbach , linux-kernel@vger.kernel.org Subject: [PATCH net 0/3] Fixes for tc-taprio software mode Date: Wed, 14 Sep 2022 17:34:36 +0300 Message-Id: <20220914143439.1544363-1-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: AS4P191CA0029.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:5d9::12) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|DB8PR04MB6777:EE_ X-MS-Office365-Filtering-Correlation-Id: a8426d42-d03f-4286-8bf4-08da965e4bab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ADHzLE7fDssPqV2XtV62kk6Kkiz1pCrxOb/LSdJ/DWYYOWwpwkofwHQBJEZXmTNpOC4UpmZLRGcKqQtcurSN1UAYO1MlLJEcb8bbJi2P2tqlS6VvuRPm9Td/Tv4IJrhK9Y/Jm6qMOS2/eSE2FWiQ7zZeyDyciyppR5fy+BAymgW2OCW4OWyIYJvn6lKo6nVOrnRRbQzWlisDdkZ2dnPGnAOBiZIJJTgpM5iqMexXGYmiiJFIkYSKKwtK1DUsrDhricQPT3JaZx3jm9swf19nPcLSnb4SnRki7z1dNHvLLMGhJWsM4XVRJ2grfMwnqJtZZLfE/1vNrwUnL2wfjGbXXSEwIXqbUSlsWlenYHvZimZe/sKFk99JdIelFXLbaTrsNda1p38vlBvJlb8qmQSAzIWJtIIdwDll5FOcIgGpQhMX7gSEoGJvq5w0r2f2u9CfeUL+bKZ6sFoE+v1jYIiYu9S5bjivq85hJEAOJYGe6xvkUscMepU46GCNujFzzioP5CYF7F+z7Rj7nO8xzz/XD+amrZqYUnsMWDfMNnyY1IoYzl3rESdA8dw2mxdqXTYtnTki9f/zcAPavLJBtpLQM7PcUIqhlbS9NWG0ssR1cPT/ju6M83AywhzFVWBV+HeuxtVoAidgx49xA8EIsPm83q5g0bmJBvDzmYOgOlMtdjL6KP54FtFRETHJKRzIGsSU1Em6vCg1fG2tZfdB49LuOBkBMEGKkwa9EqVzuYNoija7CDW+H4s0GRgTV+AbCYtO1QIn+ThmSvG0ZdVoRC9fKA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(39860400002)(366004)(376002)(346002)(396003)(451199015)(6486002)(4326008)(38350700002)(66946007)(5660300002)(6916009)(6512007)(7416002)(6506007)(2616005)(1076003)(66556008)(52116002)(36756003)(41300700001)(26005)(83380400001)(86362001)(66476007)(186003)(8936002)(44832011)(8676002)(4744005)(38100700002)(2906002)(316002)(6666004)(478600001)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ZtrRQhu9J1gny5VqQ855e4XMXHdsfeTiq8cpQQphAcDkXZWDCDPlOFhI+aYL?= =?us-ascii?Q?cKO3Tdmq5vOZu24C76AtsnQ39lqKYDhWKWHxDjzdepq7XJmZY9sPyT05MaWD?= =?us-ascii?Q?Pp6gOBeDAwtBS8J8EoyAN74JUtpH8okVAOF7ZbZ8r1lNLwVcTq7QX3V4XzFt?= =?us-ascii?Q?rCjmx0yn2YlNpMbJ5HGgC3PyuvgYtwfGjZolu/wsMqXFLXyhy+u5ed2xegjp?= =?us-ascii?Q?ZiFxV96R/sX9pxvWbmFPpWY31Z6AgJJxrSHfZNNq6ErhERsNuAn2SAfT5M8w?= =?us-ascii?Q?hZfxGNyNgKCbJiQnmnOn5J+GWERRrh/73H/V1dMDvoPeeJPr9PVfu0l7IXxz?= =?us-ascii?Q?V/DM1ucLVfvBQrN0g/stIq4BeXnWuaPKge0j/75SryhH9E71/nbGdCUjHJzI?= =?us-ascii?Q?Jrbof4AaMW8vqCfHP2pOZ6bK3wslYwDdnX956WszAbOjTUQpXeipmp28jDF5?= =?us-ascii?Q?IMTm5uaSPpQFguQjq2A9jgfNevfytthUbNG9BjH1I0dJiFB8ELp3XaMmHm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AmMqbq3R7F0hAPeQw7gmhADatlxcKKsvCH3q0Wd?= =?us-ascii?Q?d1ZrNMe69IArKAprzP+UGuJemrcsaCRfEw3347qdv7EE2VxMiYxXqknoQph+?= =?us-ascii?Q?LetQ7kRPVPX61cNKPLYGDGg/vPlfPK0FihKgWhY4LHLOmP0zWLdyYpDLe4vK?= =?us-ascii?Q?5430oqvqHyGxexp3mEkwz0LCSraNEUz+QuHP5E/VVWWw5erCtz0Kmn15CRnE?= =?us-ascii?Q?gg=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8426d42-d03f-4286-8bf4-08da965e4bab X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2022 14:34:57.3378 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QVEM7Au7Yzowf64o8iFyhYkDvR6DvRDp5gHKUdSFcbufP2DEwtQIuk/miFfsyx3EsdVQr0ECHDrBbLHjliEUFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6777 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, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 While working on some new features for tc-taprio, I found some strange behavior which looked like bugs. I was able to eventually trigger a NULL pointer dereference. This patch set fixes 3 issues I saw. Detailed explanation in patches. Vladimir Oltean (3): net/sched: taprio: avoid disabling offload when it was never enabled net/sched: taprio: make qdisc_leaf() see the per-netdev-queue pfifo child qdiscs net/sched: taprio: dereference oper and admin sched under RCU in taprio_destroy net/sched/sch_taprio.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) -- 2.34.1