Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7186624rwb; Tue, 15 Nov 2022 08:43:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf4QRgdNqttTdiuApJ3i9hIDzRg9pPNJlTkn1MjmOvj2VKHn/9sc4Ov828mgXcia0SBtY9jy X-Received: by 2002:aa7:c54a:0:b0:459:9e3:c0b0 with SMTP id s10-20020aa7c54a000000b0045909e3c0b0mr15215052edr.279.1668530634818; Tue, 15 Nov 2022 08:43:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668530634; cv=none; d=google.com; s=arc-20160816; b=DnDozSRU5mXdJiqOVRm4fb5h3Ysb5jVsJRofFY6kaizlH867jSyr4QQTWsqDxC/tVP YhpSpK0OpMUXKLNUQ5OZW+DVgwXr9Cut8GC8dRkgVdZq+xoHnyaK0V7PGyhA9+KH712j wO9MGqQFwUU+MtMIFNTBswwQ5DwJJm0LkTX21c5QQrLQM0/bvN/3v5zIv4XmazYW/NCa y4G+qX/QrjZiUyvu8W9jjpTx0rEjJo+5GvQTn5RK+/DS6xMgEi3A6UVAOskG2d4KNJKk 2WxNruRhq9OH+1pigVVBKp+vQSn0B3FlCZ+tTi1Vn2ibTNHORMiTHtpnnG8X65+M224H uPvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version; bh=oy0i3D4azJmtS3sCcOpwJtAmvCgVzwK68uuEo6444BY=; b=wLY/wYofChF2g9jsR4jbYdPCzBNZCno/CJ/tTNOeMwQ7o8BFFqV6YyJN1JoFgOkn+p mExvsuzlAypzB4hLwlzrWuxkLzIvYkWQFhbhzRYqHD7+dInaPvP3qqF1TIFVcEPRx02r 3KhK1JJIuyIIUuv9FDH9/wGXFaBSc63x2BrhrGPG74HAdmux4YyypWiiDiZifHEbjQVB mUYPr46Upb/MmgY8lMQJL3qCdJa3fymwnLmJ//hiz9uLV+F+EJDmMoGZJt25GBLaugjj sFW0q1UWxkW+pbrGtgqsDMyGTIY2j6j0zfFvTA7eH3KVpQhqfknRkVxHBBb6vRCQ89rs 4pfg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw36-20020a1709066a2400b0078d4b605b71si11259404ejc.338.2022.11.15.08.43.32; Tue, 15 Nov 2022 08:43:54 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232839AbiKOPYL (ORCPT + 90 others); Tue, 15 Nov 2022 10:24:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231279AbiKOPYI (ORCPT ); Tue, 15 Nov 2022 10:24:08 -0500 Received: from mailout-taastrup.gigahost.dk (mailout-taastrup.gigahost.dk [46.183.139.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E06C2DF09; Tue, 15 Nov 2022 07:24:05 -0800 (PST) Received: from mailout.gigahost.dk (mailout.gigahost.dk [89.186.169.112]) by mailout-taastrup.gigahost.dk (Postfix) with ESMTP id E3B971883A1A; Tue, 15 Nov 2022 15:24:02 +0000 (UTC) Received: from smtp.gigahost.dk (smtp.gigahost.dk [89.186.169.109]) by mailout.gigahost.dk (Postfix) with ESMTP id DCD3225002DE; Tue, 15 Nov 2022 15:24:02 +0000 (UTC) Received: by smtp.gigahost.dk (Postfix, from userid 1000) id CC2C49EC0020; Tue, 15 Nov 2022 15:24:02 +0000 (UTC) X-Screener-Id: 413d8c6ce5bf6eab4824d0abaab02863e8e3f662 MIME-Version: 1.0 Date: Tue, 15 Nov 2022 16:24:02 +0100 From: netdev@kapio-technology.com To: Ido Schimmel Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Andrew Lunn , Florian Fainelli , Vladimir Oltean , Eric Dumazet , Paolo Abeni , open list Subject: Re: [PATCH v8 net-next 2/2] net: dsa: mv88e6xxx: mac-auth/MAB implementation In-Reply-To: References: <20221112203748.68995-1-netdev@kapio-technology.com> <20221112203748.68995-3-netdev@kapio-technology.com> <864c4ae8e549721ba1ac5cf6ef77db9d@kapio-technology.com> User-Agent: Gigahost Webmail Message-ID: <5a8195cfa02a95d614e782b9ae55546b@kapio-technology.com> X-Sender: netdev@kapio-technology.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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 2022-11-15 16:12, Ido Schimmel wrote: > On Tue, Nov 15, 2022 at 11:36:38AM +0100, netdev@kapio-technology.com > wrote: >> On 2022-11-15 10:58, Ido Schimmel wrote: >> > On Sat, Nov 12, 2022 at 09:37:48PM +0100, Hans J. Schultz wrote: >> > > diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c >> > > b/drivers/net/dsa/mv88e6xxx/global1_atu.c >> > > index 8a874b6fc8e1..0a57f4e7dd46 100644 >> > > --- a/drivers/net/dsa/mv88e6xxx/global1_atu.c >> > > +++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c >> > > @@ -12,6 +12,7 @@ >> > > >> > > #include "chip.h" >> > > #include "global1.h" >> > > +#include "switchdev.h" >> > > >> > > /* Offset 0x01: ATU FID Register */ >> > > >> > > @@ -426,6 +427,8 @@ static irqreturn_t >> > > mv88e6xxx_g1_atu_prob_irq_thread_fn(int irq, void *dev_id) >> > > if (err) >> > > goto out; >> > > >> > > + mv88e6xxx_reg_unlock(chip); >> > >> > Why? At minimum such a change needs to be explained in the commit >> > message and probably split to a separate preparatory patch, assuming the >> > change is actually required. >> >> This was a change done long time ago related to that the violation >> handle >> function takes the NL lock, >> which could lead to a double-lock deadlock afair if the chip lock is >> taken >> throughout the handler. > > Why do you need to take RTNL lock? br_switchdev_event() which receives > the 'SWITCHDEV_FDB_ADD_TO_BRIDGE' event has this comment: > "/* called with RTNL or RCU */" > And it's using br_port_get_rtnl_rcu(), so looks like RCU is enough. As I understand, dsa_port_to_bridge_port() needs to be called with the NL lock taken...