Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp323118rwe; Tue, 18 Apr 2023 22:48:53 -0700 (PDT) X-Google-Smtp-Source: AKy350YE0hCFOP4iZzM7PmQLPXIFWVm8lW7qqoi7ERA5J0YluCTkN0bTSweiUOxmGve/pyOs9XPO X-Received: by 2002:a17:90b:3445:b0:23f:ec0f:aaae with SMTP id lj5-20020a17090b344500b0023fec0faaaemr1828417pjb.33.1681883333001; Tue, 18 Apr 2023 22:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681883332; cv=none; d=google.com; s=arc-20160816; b=QjmmFmKMJqQyZgRaNYIlYmBC1sMkfoCo1AU1XvfKZQTuyCM7/GobPBC55AjGMSJMjf J2PpYZHM+NlFilqLEYXApuCnon6+gUssaI4pAQ/tQMJD6n/8f1Dh7Bn0CxDRcg4sjlBJ 6EfI5uxlz4w0fbDvDbdvE+j9AUkrqoBwVJldqeMTuFbECGidkFMP4t9ObgJUFdkVeUiw y3L78u5G/K2iXOrz6Gi0SfWxpfm/DVupbo3l+Smv/pPLO01BivC4rkbEpMZwfdaiEhek kCV0GvSDJJPGQRvhJHLTUgsIRDUPHH0aiJhCr16kvkxLFONhtCS+dWsC5b9DHyDHc8+9 MAlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2OSQxrSfo9g2PRmFaM8khgvUPSinJ6+/aFBwzvj216c=; b=fhdvf3CXFkHI1nPWRIGzgvzNLr2TqIWWrHUSP/QABYy2F8ZC6LxEGmiM6/ZAqA8yXu /S65Atvb7tqHj8NUo00Ap4eJf+4QrD3ZVvKnP8LHL+ZoklWRA3kEfNpKqhFDiTCp+iHc Y93O+ed4zDMp+L/zoFwS39XMSts8dLUjXPKODv6ElNQ76LvuqyYK6eUmGy+B190J9u1T 98he6/pF4pSTMvn7BAz34pougcglygqiUM3QRqFyg2oD3UY+0UOoou618LfUK+XojaLG 8HJPPB/VqeCktdhBj5hWG6Fkb/6kQRlr6L+Yetod/IS3ooFRVAM2i67WllSVD17pAyb1 geYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="reV/gURg"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v37-20020a631525000000b005130f15c5b1si3478513pgl.363.2023.04.18.22.48.41; Tue, 18 Apr 2023 22:48:52 -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=@gmail.com header.s=20221208 header.b="reV/gURg"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231560AbjDSFaT (ORCPT + 99 others); Wed, 19 Apr 2023 01:30:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbjDSFaS (ORCPT ); Wed, 19 Apr 2023 01:30:18 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F07954697; Tue, 18 Apr 2023 22:30:16 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-63b4bf2d74aso2443512b3a.2; Tue, 18 Apr 2023 22:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681882216; x=1684474216; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=2OSQxrSfo9g2PRmFaM8khgvUPSinJ6+/aFBwzvj216c=; b=reV/gURgFVvnY0EcU+e/bKuk2FWHgQw7hdLeo13u0ORgheCdKGB6tX34/Mnj/9VHrp DnEYZIQgvmwq2zSKyc3Z3ABTJAmopgxw5jkcKWTOHSoQdh0yEnhkwn5S0JPoOOKnJxN1 g+a7NYaePRNCBi7MDG1kk9qSYYRi2j4w9DWK/LOpY/RIS6DfJY0GuVMrsbn8F6xq3Ofc ucXWdYbyauvbZ3VfFY2pKEpMXSTw7OwihS5RcyNnsE89U9u9M/PlsfRaXfFkVurAbJNr GhhAYRrJf4eDN8vkzYytZ7d+BHALju5zYmab2lvTZCQNtD62ao8LWndELg4G+28z3qHV 8nBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681882216; x=1684474216; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2OSQxrSfo9g2PRmFaM8khgvUPSinJ6+/aFBwzvj216c=; b=iJ6o69WwT85TCGoRbyIrS0d+6d4ZvmQwV45tpTTSan6tAWvOdDIRms10ClXMPXIWPc up13z+mop4pYvzKS6AAEjx80ffogFaZXCLi1gVjqCukdba5vHVuWhW4X3dbHCpglJvIK c8xfnubx74uYuYDUZUgp7qoLhmIq8DwNKromYr17U3eovj8LI+sUZ/alXYo+s7vHWO0D Gf1TliBtUdfdl9J3seZKUIxLNhahs4szAVzECDUcA5Lbe/6LFbep6REcOZTQcMpSTLML WGG+VHWzlPXltaZxd+fX/Y9gdsAGU5yMvY+/fw096ArWS8g3SJgGGEbiIPRNN+SvAl0s ZV3g== X-Gm-Message-State: AAQBX9dNlMGdVn/QSiv0K1pykFbghya0O0SjVB5T3TDciIgiSumB7/0o 4YwqmSZJo8Sb6Y8ECRKZ+7Ucw22SEEFz1BJwCyk= X-Received: by 2002:a17:90a:51e6:b0:233:c301:32b3 with SMTP id u93-20020a17090a51e600b00233c30132b3mr1711226pjh.3.1681882216318; Tue, 18 Apr 2023 22:30:16 -0700 (PDT) MIME-Version: 1.0 References: <20230417013107.360888-1-zyytlz.wz@163.com> <20230418213340.153529d7@kernel.org> In-Reply-To: <20230418213340.153529d7@kernel.org> From: Zheng Hacker Date: Wed, 19 Apr 2023 13:30:05 +0800 Message-ID: Subject: Re: [PATCH net v3] net: ethernet: fix use after free bug in ns83820_remove_one due to race condition To: Jakub Kicinski Cc: Zheng Wang , davem@davemloft.net, horatiu.vultur@microchip.com, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, 1395428693sheep@gmail.com, alex000young@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 Jakub Kicinski =E4=BA=8E2023=E5=B9=B44=E6=9C=8819=E6=97= =A5=E5=91=A8=E4=B8=89 12:33=E5=86=99=E9=81=93=EF=BC=9A > > 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. > Hi Jakub, Thanks for your reply. I'll figure it out to see if it's really necessary. Best regards, Zheng > -- > pw-bot: cr