Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp526279rdb; Wed, 17 Jan 2024 09:04:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYTPwjJE/ziygZ1obv/uc+a72EaRvbxVqzJdttVU2SkkpI5gdhlCTX9WpK7qLqUvUYxVwV X-Received: by 2002:ad4:4eaa:0:b0:681:74d2:36f0 with SMTP id ed10-20020ad44eaa000000b0068174d236f0mr1710414qvb.27.1705511068251; Wed, 17 Jan 2024 09:04:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705511068; cv=pass; d=google.com; s=arc-20160816; b=xZ1Vz08ZHOUd2F46YEzLSuaBB88XyEL0r8iTcmMiI3HyKeZOiC88W0elEdcRD4cxh+ RBrcUYN+fcaDTQ6d+zDts8zae/LOA+dJsH6sODPWOLeoHIKr2Y4RUIc/ppIlGX3cZ03F bBQ2pSR9QfjohT07Xs9qBjx5JZ5Rip+kp1CtcTSoQ7wfzYCHXyqgLj3uOjXIdOmJi9ZG dGoo8jB5nAR9N3hgqTNJjB1v9gWvWJUY+x/YJgum5wJcFh6ytzAsh2K0U7run0G7oNLI LhCHRAUF1MW46J9l4WvZy4H9UaPLRJtrgQ1bjyoKrAieKBkXgVtOXWxghdwrxCpYxxOl 3zgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=71oRC0QNOLC5T5Xfwt4Sxyl5vPyoqFz+oPfRpT6Q6/I=; fh=QWGoDIn6VlnpParx6ZyCkZuDlo+HfPjOPYtbNP7ezHg=; b=IMqiy+PzteM3IsvB+llrTj9oGS7OEJuaGURJOTKmXiDtiAsS6VzMZEJyHUc5lVGkOR KYeHrnUITjuh26d9FLmjGd7hGvdoE3beRp9JKRWIoCXoumz4zFTMnkXxChZnoryD1fdV lrfZkA9oVza8yzt8IwuwZUcRsv8cHU7Lf3qGBFG2lG1mGCOqYkGT8lZRFL9ywqZuMRnb r+Yz/sJIyRxaBPe2ueqdDkj+cGm+NP7U8tBma6fKPomC/EFGNtGk5nxHhqfXNy1+sMaY L1Syn+c5DC8xIdJgL2KBGpuD5urcaPSx1VY+JUR6arzOH3T9O7QpHKkeqlbw/rgsSoY4 szIA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=wAHIHXY1; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-29253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g16-20020a0cdf10000000b0068186474c8bsi608740qvl.561.2024.01.17.09.04.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 09:04:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=wAHIHXY1; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-29253-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EA7091C21604 for ; Wed, 17 Jan 2024 17:04:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D46D1225D9; Wed, 17 Jan 2024 17:04:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="wAHIHXY1" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73FF5224D3; Wed, 17 Jan 2024 17:04:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705511056; cv=none; b=m50+UlUIwdqhURjm1KK8l0XlIZHN1OSMx5AXM6Hx0GjT0fEPymZo3riuAk93XdddQ8fgAlIk1ZX31VkUsbPku8LSta3QUdxkbmqqBjAC3tV1j5xoVNsN7bYYXJrRWY5P7tPrNLSZrhx26JX6CB1BQrWsOILug+gAlH/BnsGrJh8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705511056; c=relaxed/simple; bh=PCnHCIBcMIrtdxe6gfCE1zg42s8OxJnV4lvd4LUbthU=; h=DKIM-Signature:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=WwxulNNsdRJtfyF9IFnSimqJgLcDgYaLgR6Ei9lGXli27PCZ19Ce0YZ6ii05CyWPY0Rg/0iPHBOg0xex+KQZcRra4RMleyUj27Vvm2zFZwmKtSeVDsT2wWm0+18wD1NMN2+lGN8AZG9dOvfWgs/gyfuSrpOfVc5yLZ6ckAsIYS4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=wAHIHXY1; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=71oRC0QNOLC5T5Xfwt4Sxyl5vPyoqFz+oPfRpT6Q6/I=; b=wAHIHXY1IdQj+8nCs3HF1cyQw6 EeLDjRt6NQPdjgM8cs8fjmvEmRPNwsAPiPbTQ7IwFjDq5VDXVyv//OQ0Vf32TVmbDV2JEpr6fylxW da46O2bljL1i34qBkQKL0h3uAh82rewjlUg+L6htMtXQ9FqixovpCD1TM1ShJmghMB+M=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rQ9Kb-005QG5-17; Wed, 17 Jan 2024 18:04:01 +0100 Date: Wed, 17 Jan 2024 18:04:01 +0100 From: Andrew Lunn To: Mirsad Todorovac Cc: Jakub Kicinski , Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Heiner Kallweit , Mirsad Todorovac , Simon Horman , "David S . Miller" , nic_swsd@realtek.com, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org Subject: Re: [PATCH AUTOSEL 6.7 021/108] r8169: improve RTL8411b phy-down fixup Message-ID: References: <20240116194225.250921-1-sashal@kernel.org> <20240116194225.250921-21-sashal@kernel.org> <20240116174315.2629f21c@kernel.org> <4523ad21-d06a-4ba2-9b46-974a6093b189@alu.unizg.hr> <2c590117-96fa-4e0b-84bd-9e3ea138d93b@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > Hi Andrew, > > Yes, I wasn't aware of the 100 lines limit, and yes, this is not a bug fix, > but an improvement (optimisation). > > I think by this I can join to consensus, this patch is not a candidate for > backporting. :-/ > > However, I am concerned about the possibility of two kernel threads accessing > the RTL NIC intermittently attempting to program the NIC over the RTL_(R|W)(8|16|32) > instructions (which are expanded to readl/writel and assembly). Most calls into the driver are protected by the RTNL lock. There are a few exceptions. probe() obviously does not hold RTNL. Actually sending packets, and interrupt handlers don't hold RTNL. Please look at the code and see if you can see any paths which might do parallel access without holding RTNL. You could also do some testing. Add ASSERT_RTNL() in the code you are worried about. If the lock is not held, you will get a stack trace. Andrew