This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit dad482e8ff563757c7833c888184f7d568310e80 Author: wangjinjing1 <[email protected]> AuthorDate: Tue Sep 23 19:11:21 2025 +0800 drivers/net: replace net_lock with netdev_lock for netdev_upper_vlan_foreach netdev_upper_vlan_foreach() was using net_lock()/net_unlock() to protect the VLAN device list, but the correct lock here is the per-device netdev_lock(). Use netdev_lock()/netdev_unlock() instead. Signed-off-by: wangjinjing1 <[email protected]> --- drivers/net/netdev_upperhalf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/netdev_upperhalf.c b/drivers/net/netdev_upperhalf.c index 9bef3d33b25..ceef1117bc3 100644 --- a/drivers/net/netdev_upperhalf.c +++ b/drivers/net/netdev_upperhalf.c @@ -501,7 +501,7 @@ netdev_upper_vlan_foreach(FAR struct netdev_upperhalf_s *upper, { int i; - net_lock(); + netdev_lock(&upper->lower->netdev); for (i = 0; i < CONFIG_NET_VLAN_COUNT; i++) { if (upper->vlan[i].dev) @@ -510,7 +510,7 @@ netdev_upper_vlan_foreach(FAR struct netdev_upperhalf_s *upper, } } - net_unlock(); + netdev_unlock(&upper->lower->netdev); } #endif
