Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7165798rwr; Tue, 25 Apr 2023 08:59:54 -0700 (PDT) X-Google-Smtp-Source: AKy350Ym2ujpJ2fGSDFIddZRBcEbcirq+txsoVTr8rWuWhEBLLn164OSbKlj3w3w4GBI4JJG+sih X-Received: by 2002:aa7:88c1:0:b0:63d:255f:36f4 with SMTP id k1-20020aa788c1000000b0063d255f36f4mr25625609pff.3.1682438394438; Tue, 25 Apr 2023 08:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682438394; cv=none; d=google.com; s=arc-20160816; b=fmTl/QE2vrr/WreDez88M0kHJ9lYPrP6M1GtaqmfXH8OcfDc+moxg7ZU8LMotZ44IK 5Y32yfbC8aQVtwVY6LprfUV8ogIWUUxtNtNIIsJ3zP+bT7pTGX24GvPpRDpO8lro+nTi jJfdmHXILQvXMoY8RzaNrSU9sHCCP1kOJ3kixtNSOX0SbebLlEL6pe/LzL14pYsyIcZp iGpI/07MMYz3ITaUeFOu6+pOw0yGcuBzDJee8ZjjhyIkxxT4Ft4Gv+lE37rc8Tcl8OQf ZdgaFVF3zvYqDRGccYAyuzObmnmFTK9i1QyJAZqRo6Z0DHvOjrYYbaOk5qF0o1TxI8Sx F0Xw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Lo1p5LltrEKXl/88D2q7BUpczreXbGm/j2+ZOAMRKVc=; b=BSeG5l1xSGmkfMNdr/gqRo1x8PuGwG5k7NL09wJAAeYJymBGEtS5jied76hZ0hg9Qn pvYvBEVSCKn6Z0VJurAbcw8ztJWlH7dE+13F1gNECizNClOXxXX0wPTe1GPKlVkvQbgl ZkoXS3qpsRreG08D6kq/ietPQIGmJ9x02crQBtr0HQQsg6XWzVfcc14+oL5fCHAqHzik KIiL9SprwX3rJQHPM6iaYFTCMuvfPtPtZ6f7dOJY8qDOKt520iu3EEJbDFPFdNxoEfq8 YZ0Mb8f9dni4fgHlPjrS3XV8jrl61vY8j1DPs+5Pc+Y8EHJ0DSlTkPJRB7+wETbPsuxY HSVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AIRaBP7X; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d26-20020a65621a000000b0050be9448846si13256192pgv.846.2023.04.25.08.59.40; Tue, 25 Apr 2023 08:59:54 -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=@kernel.org header.s=k20201202 header.b=AIRaBP7X; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234572AbjDYPvp (ORCPT + 99 others); Tue, 25 Apr 2023 11:51:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234568AbjDYPvo (ORCPT ); Tue, 25 Apr 2023 11:51:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEA21AD2A; Tue, 25 Apr 2023 08:51:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7476E626D0; Tue, 25 Apr 2023 15:51:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62036C433D2; Tue, 25 Apr 2023 15:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682437901; bh=iFlqifPijavkdaktv7fAZ2L3FnnTuZoO48qo6G/HZVU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AIRaBP7XPcOGkEQTebvDXf4yszZAuV81CVjk5ZPc6lJmSy8Oxxj7CZqamC1KLxkuG lloBD2Tk7c1rpu8CxbUoKtaliCtWP9QPXMB8aGFX4Z7RHfo9/nBDnGTiLwso4zINRH VBYlriANP0S2E7J12MctLlq5uSGA+2MleFjqyJKDxUZ1wKftHgGvkurkrWolPq4vVE X14pVPD4R2N7QeHZVgznpV1e4LOq+KHlp61bEcAzUmGpew6dtQ1CBPJVlfevQLnD4+ YgTYvOZ5NFgM9f9oBzL5FgXPQaSgo4qeiNH1wUQe4YGPktlQzPKOaEksXki4B0TKEz vXbFDCPUNYRcA== Date: Tue, 25 Apr 2023 08:51:40 -0700 From: Jakub Kicinski To: Leon Romanovsky Cc: Subbaraya Sundeep Bhatta , Geethasowjanya Akula , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "richardcochran@gmail.com" , Sunil Kovvuri Goutham , Hariprasad Kelam Subject: Re: [EXT] Re: [net PATCH 5/9] octeontx2-pf: mcs: Fix NULL pointer dereferences Message-ID: <20230425085140.000bbcc1@kernel.org> In-Reply-To: References: <20230423095454.21049-1-gakula@marvell.com> <20230423095454.21049-6-gakula@marvell.com> <20230423165133.GH4782@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 On Mon, 24 Apr 2023 10:29:02 +0000 Subbaraya Sundeep Bhatta wrote: > >How did you get call to .mdo_del_secy if you didn't add any secy? > > > >Thanks > > > It is because of the order of teardown in otx2_remove: > cn10k_mcs_free(pf); > unregister_netdev(netdev); > > cn10k_mcs_free free the resources and makes cfg as NULL. > Later unregister_netdev calls mdo_del_secy and finds cfg as NULL. > Thanks for the review I will change the order and submit next version. Leon, ack? Looks like the patches got "changes requested" but I see no other complaint.