Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 AB0BA38655A; Sat, 12 Sep 2026 13:14:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789218854; cv=none; b=dN4cF6P7Khynsu74aoHImjIhj12QN+xD+/W8uCWdbwaxyq6R/j23OPXuzeOux/pqYFHqdTR/FDvq9xRXD9uO+vhry3fZpJGqGz/VKit83Iqsv8l8adrB53MO8YqsRQ/CxsJ2Nk7Qxrntn2zfRvIlrpLajCQKr+08JuHoLBvJi1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789218854; c=relaxed/simple; bh=JJfgTdnuNiGQRCrNU3gG76rPYQBH5ISVRr++N3rBjy4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LenvKQ4xBfXhrEUd0VGLAJwZITeNN4Sp7vewM4VOP4+TisoJB3imNW56/ewcReZtgzBVCGu8xVr09nXZpcMo1QihYFoPSAAAeUOMJjVoKVI1b6PtLROvoL6lF1OpBj6HJcjJTtdrpnN9jKscYpqUYg3L1gefKjsWcIH/cdXIVgg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FiEqtaGG; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FiEqtaGG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C0ED1F000FF; Sat, 12 Sep 2026 13:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789218853; bh=epeYEyyj8rbaoWI07hjdTVpvJqRrlwKQzfVeefiQriA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FiEqtaGGSbKiot6onZSDalIbAY71zZkoP/cW1rjSxketx3Y4Hcak2z7cu58h44nRZ thGUmeVJfQBohe8QAn5GmRX//fJlpB3pfTwFaB6nHlmGNIdcAIeRcEq+RS47Gk/QW8 X1tdUk4iBNtljpoN5X69Di4p9XmqGwus2YIdoxVM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nikolay Aleksandrov , Ido Schimmel , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.12 1204/1376] net: bridge: vlan: fix inverted default vlan notification Date: Sat, 12 Sep 2026 09:00:30 +0200 Message-ID: <20260912065634.383991964@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nikolay Aleksandrov [ Upstream commit 21040c7f931502070dcc66bb0f1aeed07dec032b ] A notification should be emitted only when the vlan delete was successful and not otherwise. The proper check is if br/nbp_vlan_delete returned 0. Fixes: f545923b4a6b ("net: bridge: vlan: notify on vlan add/delete/change flags") Signed-off-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20260814141640.64958-1-razor@blackwall.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/bridge/br_vlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 1aa3830352948..a61211a09e1e8 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -1129,7 +1129,7 @@ int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid, if (err) goto out; - if (br_vlan_delete(br, old_pvid)) + if (!br_vlan_delete(br, old_pvid)) br_vlan_notify(br, NULL, old_pvid, 0, RTM_DELVLAN); br_vlan_notify(br, NULL, pvid, 0, RTM_NEWVLAN); __set_bit(0, changed); @@ -1151,7 +1151,7 @@ int __br_vlan_set_default_pvid(struct net_bridge *br, u16 pvid, &vlchange, extack); if (err) goto err_port; - if (nbp_vlan_delete(p, old_pvid)) + if (!nbp_vlan_delete(p, old_pvid)) br_vlan_notify(br, p, old_pvid, 0, RTM_DELVLAN); br_vlan_notify(p->br, p, pvid, 0, RTM_NEWVLAN); __set_bit(p->port_no, changed); -- 2.53.0