Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2526214pxb; Sun, 23 Jan 2022 07:27:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/uORArgTjOsPrRofDdmr+mip+oF6aHrGwxrFT0BvLz14rBH9OxWVbrMq+DcNs68hK15bf X-Received: by 2002:a05:6a00:728:b0:4b0:b1c:6fd9 with SMTP id 8-20020a056a00072800b004b00b1c6fd9mr10612140pfm.27.1642951670582; Sun, 23 Jan 2022 07:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642951670; cv=none; d=google.com; s=arc-20160816; b=iegal60MADLHD1RL8dBHlrVqxbq9Op59JTCCA1x8u4HA3pcKNT7IGAd0eCp+3hIgy9 vPltnjPbDyvjSHMlCvQTDso+dgxECjZDCyh23bJAM7D2rf6sPAqRiBnGsZP+vWQq7tON bHrCX+AKOgCKx9M++5WJwYureIWoUaBGRuIfH7rm5Xz2qoXCz6taRNmH5Vb/KKM3h/Jw HryhRdb6TKmMcmNhSr3jLv91aMdXNOrd/+QTiKVMMQjXJgb5Bfr2EjUiUjMcsxvD0/BQ QokXDlg1TIPcwOeJ6slMemjJB/xsbFyu8fgmQnThPA+CCgD/oUwjsderiRnTy19w+Zqc Wlew== 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=Bz/AheZfeJW9tL5H4ViPbo6Ne3/vl1k5qVgGayio4HA=; b=RC91g2ZGnciIcpHyVwZpXFgBk3eHN668xovtv/GxeyHy3EnVS9roQC/Fgz5ymcTSHz E1xcrPmffxGdbVuY/POD5YVx70DJK9CvUbyLWU+DHomWDQfZxHFTwX88mGF+Vg8xrKY6 K4jVhIV/IcT6jREHgYa3Kt7INtHd57CxnBzp5444wn8zjoJ8bLtRISKbI5yFanlsDbJ5 VY+hTFNxdlxUVoYhHVwKcPn1jcitXsJSI51X/wPZwtblFaZX6FnJf6uKSA/iB6kk63b0 FNVNJHKrBQ/Qk3ePzGwj2Vq6dLEtxz7wHbswcd49vBTZTj/rFQtMem711Bl5bhVLVs7z qocQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lJghKbHC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si13228132pgf.429.2022.01.23.07.27.38; Sun, 23 Jan 2022 07:27:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lJghKbHC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S234801AbiAVTRn (ORCPT + 99 others); Sat, 22 Jan 2022 14:17:43 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:46648 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbiAVTRm (ORCPT ); Sat, 22 Jan 2022 14:17:42 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 5F2EFB8092A; Sat, 22 Jan 2022 19:17:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0906C004E1; Sat, 22 Jan 2022 19:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642879060; bh=JeXyzQULWAbMFiomXAsBJNjnrrAJw5Mhyf59QGiZVeo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lJghKbHCWhhld84ChEdv1nbqcjjMpckEn/db3woEjyGguVvRFezPhBgFEzsfbk6ZY Yf8sPYOMEUJ/AGXmOgrZ6QhF7bFbOpJMT5+SZIHs7ZsthkWX39YOLCWfdon4c4JaqK dJZPUrhAuYbf46qh6GY9Uz5/AegtWYH25VU2fT7PCoF2d9SS1t87a7Gz1ohvxtYVGA C3+xYc0k9kRnbhdFFLDBY8AZuZX/fwoXf7n8PvPs3+93165GLs6ybHFydLQu3EsgXk JqHRyFcnz05PISBjcexYSF16MvvRXAZSY+yWwpz8YiT+eu+WZ7r4UT/7/dfX7FmaBt Mv4osTx3hnu8A== Date: Sat, 22 Jan 2022 14:17:38 -0500 From: Sasha Levin To: Vladimir Oltean Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Vladimir Oltean , Florian Fainelli , "David S . Miller" , andrew@lunn.ch, vivien.didelot@gmail.com, kuba@kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH AUTOSEL 5.16 203/217] net: dsa: hold rtnl_mutex when calling dsa_master_{setup,teardown} Message-ID: References: <20220118021940.1942199-1-sashal@kernel.org> <20220118021940.1942199-203-sashal@kernel.org> <20220118121329.v6inazagzduz6fyw@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20220118121329.v6inazagzduz6fyw@skbuf> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 18, 2022 at 02:13:29PM +0200, Vladimir Oltean wrote: >Hi Sasha, > >On Mon, Jan 17, 2022 at 09:19:26PM -0500, Sasha Levin wrote: >> From: Vladimir Oltean >> >> [ Upstream commit c146f9bc195a9dc3ad7fd000a14540e7c9df952d ] >> >> DSA needs to simulate master tracking events when a binding is first >> with a DSA master established and torn down, in order to give drivers >> the simplifying guarantee that ->master_state_change calls are made >> only when the master's readiness state to pass traffic changes. >> master_state_change() provide a operational bool that DSA driver can use >> to understand if DSA master is operational or not. >> To avoid races, we need to block the reception of >> NETDEV_UP/NETDEV_CHANGE/NETDEV_GOING_DOWN events in the netdev notifier >> chain while we are changing the master's dev->dsa_ptr (this changes what >> netdev_uses_dsa(dev) reports). >> >> The dsa_master_setup() and dsa_master_teardown() functions optionally >> require the rtnl_mutex to be held, if the tagger needs the master to be >> promiscuous, these functions call dev_set_promiscuity(). Move the >> rtnl_lock() from that function and make it top-level. >> >> Signed-off-by: Vladimir Oltean >> Reviewed-by: Florian Fainelli >> Signed-off-by: David S. Miller >> Signed-off-by: Sasha Levin >> --- > >Please drop this patch from all stable branches (5.16, 5.15, 5.10). >Thanks. Dropped, thanks! -- Thanks, Sasha