Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp336023rwr; Tue, 25 Apr 2023 23:22:32 -0700 (PDT) X-Google-Smtp-Source: AKy350Z6zfIjM6KMFF14FpZkBnknd4nFlb0xD6AcIvricy15V4bhfbh7Sb5RUj6rMNt6fVlTiqTG X-Received: by 2002:a17:903:22d0:b0:1a8:1867:1f71 with SMTP id y16-20020a17090322d000b001a818671f71mr23659945plg.41.1682490151687; Tue, 25 Apr 2023 23:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682490151; cv=none; d=google.com; s=arc-20160816; b=OUOsZLQMaoIuANUpnO2K2m3rvu3PSK55LhMAlZ2gKMc+ApIfPmM9eH30zB4qxZxwxd OxRX48XFgV2eL5k5azKZkAr/yFHZv/6nOPUPxk28L/rLTNE1Hp5vz5HbPaJUftr8bGY7 7a0XFEG92zDHpaJaj5xnzUqIe1+xb5GQeSf0YxG0CcUnvSkEEFfiMc0AnsTxS4KRs+G6 eljq8robcJ1ufyxlF+HkYgZTn+e+T/di9hinYk20Uvcl82Vf9TfRnUfwjqtGCxYCT9ZY mpkPgYRiGeAEokX1OW1Hb/17rCbIZ7wC552iJ3i8Q8LA15/WFbHBS4dt3u9fFjQREKRZ 7Iuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t0/T3tc4HB7lKQgQxNWWC2qOV62wGfrB5xX0r4N3B58=; b=BNV1X+jFhcAb82C6NiVCE87ho6YJDSiaq46UKuny/VJMhp6oLGIO24Qdl6Bnhf2ryN /q+fID9CPGcKk6ReAshuEtNVyQwiTXCPtH+Zl8/4zeFbYHMYJBvjYm1hVTqwiElOjMY+ 1bFFtAmQWqoZOQ3B28aKyhIfu+LS41dDhgoK8CiCQJFSNLv+14NpKDvE8/f2uXdWG9+0 JsTg1xZdMeyS9yZoa+m1MezoT2OA2aQGFAyM6JCSgcbwr4i7LOvcWstckm95PtYGAHI1 GUc8QQ/Ny709RJtgoYXVgzsPcLzh+D5jLj4Adg5i6Ikiqm0m+CNxvzjx7mMz+nFsPNNp Nmvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=awoSNDIM; 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 n14-20020a170903110e00b001a1f6671a6dsi16924012plh.397.2023.04.25.23.22.16; Tue, 25 Apr 2023 23:22:31 -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=awoSNDIM; 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 S239403AbjDZGRC (ORCPT + 99 others); Wed, 26 Apr 2023 02:17:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbjDZGRA (ORCPT ); Wed, 26 Apr 2023 02:17:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 381FB1FE2; Tue, 25 Apr 2023 23:17:00 -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 C8CD8626D3; Wed, 26 Apr 2023 06:16:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 616A7C433D2; Wed, 26 Apr 2023 06:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682489819; bh=yxTBxHMI3Xt+WJTN+T1mo1v1VDu0RQ5kia/VlF4XDYQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=awoSNDIMotZyV1S0SHNBD53GkM67TRTNvDP3ntx67QsVGh1JgyEZevK/+uR09g4Fv cHaC1a2JU2DW3SoxO2wps5H5UQbSchElzIy2inaF3EA9p2JuIXGI8ChqXeVEmkd17u dDKumrbS+nHXQdLLNxq6GMnuqf1uMsaot5Cn2CoIkmDTYDlY+zFZvhuhsMTO0D6eyd DdVRs0atg/fFPg53z4C0tqlWI8/uZasuEWLhq13SvFR/k2FVSkokH0bYmFzOcV2Bsj +Z4pUqXej/oVVSJzf5vLksYZPQcZk0EI/0QvCfqXYvWC0YTiVGA4aHEH2WmpuI20Ww 8//y4EgbrRQkw== Date: Wed, 26 Apr 2023 09:16:54 +0300 From: Leon Romanovsky To: Jakub Kicinski 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: <20230426061654.GC27649@unreal> References: <20230423095454.21049-1-gakula@marvell.com> <20230423095454.21049-6-gakula@marvell.com> <20230423165133.GH4782@unreal> <20230425085140.000bbcc1@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230425085140.000bbcc1@kernel.org> X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Tue, Apr 25, 2023 at 08:51:40AM -0700, Jakub Kicinski wrote: > 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. Honestly, I was confused and didn't know what to answer, so decided to see next version. From one side Subbaraya said that it is possible (which was not convincing to me, but ok, most time I'm wrong :)), from another he said that he will submit next version. Thanks