From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48C03C433F5 for ; Mon, 14 Mar 2022 16:49:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbiCNQue (ORCPT ); Mon, 14 Mar 2022 12:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244294AbiCNQtD (ORCPT ); Mon, 14 Mar 2022 12:49:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FF9C28993 for ; Mon, 14 Mar 2022 09:47:35 -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 ams.source.kernel.org (Postfix) with ESMTPS id A0EF3B80DAF for ; Mon, 14 Mar 2022 16:47:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44913C340E9; Mon, 14 Mar 2022 16:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647276424; bh=y6ve0JQmIubH7lp/f5mBP7QvjBZzSLWz7zy4rk0W5Sg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gHzZ+rsHOWYMbjQtMi7whEUGzkheVQAEA91x3c8kk7MkaH/qPtOYMnlxjTBP0qy5a cSjU/fuP4XSGzTpy/OY51pIOo2EOd973dCEtRKK1rSfQSu9/Ks8yrwwY/TBQNK4q6L Fb8CKE+ggy6J5ReWS/3awC54dNh8ey3HyhKpKzQC9l8V3LFJ7Zd6w7fD1OSdeIWpxs WFij86aAGhApruWgwoeq1QXucWxmGGskQe0Pg+bS9K/XNcar5ExGo3KaU7VA8cWfU2 ILonTQ//0S4C9TauRXENeC8cj7qh4UjyqukLOMehZ/13KewzAlptySYXffAtUGrogi 4Na4PV6WxF12A== Date: Mon, 14 Mar 2022 17:47:00 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Tobias Waldekranz Cc: Vladimir Oltean , netdev@vger.kernel.org, Andrew Lunn , Jan =?UTF-8?B?QsSbdMOtaw==?= Subject: Re: [PATCH net] net: dsa: fix panic when port leaves a bridge Message-ID: <20220314174700.56feb3da@dellmb> In-Reply-To: <87tuc0lelc.fsf@waldekranz.com> References: <20220314153410.31744-1-kabel@kernel.org> <87tuc0lelc.fsf@waldekranz.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 14 Mar 2022 16:48:47 +0100 Tobias Waldekranz wrote: > On Mon, Mar 14, 2022 at 16:34, Marek Beh=C3=BAn wrote: > > Fix a data structure breaking / NULL-pointer dereference in > > dsa_switch_bridge_leave(). > > > > When a DSA port leaves a bridge, dsa_switch_bridge_leave() is called by > > notifier for every DSA switch that contains ports that are in the > > bridge. > > > > But the part of the code that unsets vlan_filtering expects that the ds > > argument refers to the same switch that contains the leaving port. > > > > This leads to various problems, including a NULL pointer dereference, > > which was observed on Turris MOX with 2 switches (one with 8 user ports > > and another with 4 user ports). > > > > Thus we need to move the vlan_filtering change code to the non-crosschip > > branch. > > > > Fixes: d371b7c92d190 ("net: dsa: Unset vlan_filtering when ports leave = the bridge") > > Reported-by: Jan B=C4=9Bt=C3=ADk > > Signed-off-by: Marek Beh=C3=BAn > > --- =20 >=20 > Hi Marek, >=20 > I ran into the same issue a while back and fixed it (or at least thought > I did) in 108dc8741c20. Has that been applied to your tree? Maybe I > missed some tag that caused it to not be back-ported? Tobias, I can backport these patches to 5.4+ stable. Or have you already prepared backports? Marek