Patch "team: Fix feature exposure when no ports are present" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    team: Fix feature exposure when no ports are present

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     team-fix-feature-exposure-when-no-ports-are-present.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a9301f8fa44e1e8d1d33837ba73140dd2af5d459
Author: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
Date:   Fri Dec 13 13:36:57 2024 +0100

    team: Fix feature exposure when no ports are present
    
    [ Upstream commit e78c20f327bd94dabac68b98218dff069a8780f0 ]
    
    Small follow-up to align this to an equivalent behavior as the bond driver.
    The change in 3625920b62c3 ("teaming: fix vlan_features computing") removed
    the netdevice vlan_features when there is no team port attached, yet it
    leaves the full set of enc_features intact.
    
    Instead, leave the default features as pre 3625920b62c3, and recompute once
    we do have ports attached. Also, similarly as in bonding case, call the
    netdev_base_features() helper on the enc_features.
    
    Fixes: 3625920b62c3 ("teaming: fix vlan_features computing")
    Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Reviewed-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>
    Link: https://patch.msgid.link/20241213123657.401868-1-daniel@xxxxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c
index 6ace5a74cddb..1c85dda83825 100644
--- a/drivers/net/team/team_core.c
+++ b/drivers/net/team/team_core.c
@@ -998,9 +998,13 @@ static void __team_compute_features(struct team *team)
 	unsigned int dst_release_flag = IFF_XMIT_DST_RELEASE |
 					IFF_XMIT_DST_RELEASE_PERM;
 
+	rcu_read_lock();
+	if (list_empty(&team->port_list))
+		goto done;
+
 	vlan_features = netdev_base_features(vlan_features);
+	enc_features = netdev_base_features(enc_features);
 
-	rcu_read_lock();
 	list_for_each_entry_rcu(port, &team->port_list, list) {
 		vlan_features = netdev_increment_features(vlan_features,
 					port->dev->vlan_features,
@@ -1010,11 +1014,11 @@ static void __team_compute_features(struct team *team)
 						  port->dev->hw_enc_features,
 						  TEAM_ENC_FEATURES);
 
-
 		dst_release_flag &= port->dev->priv_flags;
 		if (port->dev->hard_header_len > max_hard_header_len)
 			max_hard_header_len = port->dev->hard_header_len;
 	}
+done:
 	rcu_read_unlock();
 
 	team->dev->vlan_features = vlan_features;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux