Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp262020rwe; Tue, 18 Apr 2023 21:43:53 -0700 (PDT) X-Google-Smtp-Source: AKy350bC1ajNFaV2AnXMjKPYYhyhS5q57xZGY6nejyTuoJvOr0m+FlFK7V6OLgsvUDKoDJWMHDAW X-Received: by 2002:a05:6871:72c:b0:178:9bb0:4c8e with SMTP id f44-20020a056871072c00b001789bb04c8emr3047992oap.48.1681879433391; Tue, 18 Apr 2023 21:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681879433; cv=none; d=google.com; s=arc-20160816; b=Y4IUqIUYlktt2s+uRei/Y+FhQieKOs3e1Y5vs2d7QqO7M3SIvZ4c+cFIdFBgqA53za iuKK3DDBZQCY14DRx5/1kgbJM1db6a0x0R5nVhP6aXOrBKjtMi0cwWO6EPugolDp+oAo 6/JaseX+7vIUoyu3TgePSrpjwBD567PrLZy28QPpM9mhzwvq+FItdNxuHB1bwXxObSiy M+0OooYiUkER30d/S7WiRObZzGY6KRByjwLGCFDHocaGsmhjOGsUQ8jAYvs0YUtRve9y 42htkEyq96xT7JkhCbRSZNyqV1VnfPmT25mNcFWqk2I1eumA3gwcxcZhvj5ILtwNn6Cb pYaA== 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=rkJoR6Kg94MJPS7ffvhthlTl/v2wu89U/CDg/F9MP1I=; b=sa10MSvcfVqw/2yH+M7dfW+UloDLNWMMOR+87h7tBliv3EmvjBlRxkZbCg3BxMmOg4 aV/VJeVEoGGLI4MyU70kaT20tUHuwhK1qOkZoWAV8RNJWTOIrzDWDfCPY+1/CQ6TZ/TY NG/AcDNFMrOhdNhoRgUvFwtnHQjGC7++murmeQlc1Nx8f6m/oDg0/8CXh6DPu6MQTS0y zOBfzdf4ppzaXhtG6/GeCVNV3HsPlwqwoq7l7mhdZ3NuwSrf3RoFdmdKXS7D6Fi6OBbe R0zx2BwEL/ZPeNV7/ewMCvo9MF+DgP7IYOU/Y8LYQ/7uolYHbwopzGyZgwQTZOs9rQ0l 5myA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nqP/cPmw"; 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 a20-20020a056870b31400b001879d3184c4si12957708oao.126.2023.04.18.21.43.40; Tue, 18 Apr 2023 21:43:53 -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="nqP/cPmw"; 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 S231478AbjDSEdq (ORCPT + 99 others); Wed, 19 Apr 2023 00:33:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbjDSEdo (ORCPT ); Wed, 19 Apr 2023 00:33:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B01D6EAF; Tue, 18 Apr 2023 21:33:43 -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 E732962F2B; Wed, 19 Apr 2023 04:33:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEA24C433D2; Wed, 19 Apr 2023 04:33:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681878822; bh=hbjMvG0U69437nzwhAQ8/phnSWj0HXK6MrnJduauKNk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nqP/cPmw6oie4DbF4zTGeDTppWbkk7nYuR/DBFMrRpHUHI1fsGgp5a5aSRoqVtuqh VjMLG7tVa0RSs8Vp9oaVHFC5kQumLZCvpDlpieBJ3fg5Ypt2V9UN2xXvpF5EpIMjt3 ZlC8/ZPH125ALWIqvegQDz2GfITWrqnep1WdwE2LNRT3AwnIiB/Q7mkUPfHQtWeGqP pXvQGRshL5Ho/y5u+nEzYBsdfGLlJE+ReqWeaUs0YpUZnzEvXfoKuFB1LnauN9PTfu KX0eBgPuxrCZT3oINpL2iRc8M2F6vOVICmCp9InPoQLnMGFQHETKcmpgMeWuM0l0mu Nh4Q8I4xm5ODA== Date: Tue, 18 Apr 2023 21:33:40 -0700 From: Jakub Kicinski To: Zheng Wang Cc: davem@davemloft.net, horatiu.vultur@microchip.com, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hackerzheng666@gmail.com, 1395428693sheep@gmail.com, alex000young@gmail.com Subject: Re: [PATCH net v3] net: ethernet: fix use after free bug in ns83820_remove_one due to race condition Message-ID: <20230418213340.153529d7@kernel.org> In-Reply-To: <20230417013107.360888-1-zyytlz.wz@163.com> References: <20230417013107.360888-1-zyytlz.wz@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 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, 17 Apr 2023 09:31:07 +0800 Zheng Wang wrote: > + netif_carrier_off(ndev); > + netif_tx_disable(ndev); > + > unregister_netdev(ndev It's not immediately obvious to me why disabling carrier and tx are supposed to help. Please elaborate in the commit message if you're confident that this is right. -- pw-bot: cr