bridge use read_lock when scanning device list
Subsystems (3)
PATCH 1/1 bridge use read_lock when scanning device list
On 2.6.1, bridge is using rtnl_shlock which is equivalent to rtnl_lock when all it really needs to do is read_lock(&dev_base_lock).
net/bridge/br_if.c +2 -2
@@ -252,12 +252,12 @@struct net_device *dev;int i =0 ; -rtnl_shlock (); +read_lock (&dev_base_lock);for (dev = dev_base; dev && i < num; dev = dev->next) {if (dev->priv_flags &IFF_EBRIDGE ) indices[i++] = dev->ifindex; } -rtnl_shunlock (); +read_unlock (&dev_base_lock);return i; }
David S. Miller
AppliedQuoted 2 lines · On Mon, 12 Jan 2004 13:46:45 -0800 Stephen Hemminger <[email protected]>…
On 2.6.1, bridge is using
rtnl_shlockwhich is equivalent tortnl_lockwhen all it really needs to do isread_lock(&dev_base_lock).
Applied, thanks Stephen.