Skip to content

Commit 328771d

Browse files
edumazetdavem330
authored andcommitted
net: remove stale mentions of dev_base_lock in comments
Change comments incorrectly mentioning dev_base_lock. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e154bb7 commit 328771d

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

Documentation/networking/netdevices.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ ndo_eth_ioctl:
252252
Context: process
253253

254254
ndo_get_stats:
255-
Synchronization: rtnl_lock() semaphore, dev_base_lock rwlock, or RCU.
256-
Context: atomic (can't sleep under rwlock or RCU)
255+
Synchronization: rtnl_lock() semaphore, or RCU.
256+
Context: atomic (can't sleep under RCU)
257257

258258
ndo_start_xmit:
259259
Synchronization: __netif_tx_lock spinlock.

drivers/net/ethernet/cisco/enic/enic_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ static netdev_tx_t enic_hard_start_xmit(struct sk_buff *skb,
872872
return NETDEV_TX_OK;
873873
}
874874

875-
/* dev_base_lock rwlock held, nominally process context */
875+
/* rcu_read_lock potentially held, nominally process context */
876876
static void enic_get_stats(struct net_device *netdev,
877877
struct rtnl_link_stats64 *net_stats)
878878
{

drivers/net/ethernet/nvidia/forcedeth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ static void nv_get_stats(int cpu, struct fe_priv *np,
17611761
/*
17621762
* nv_get_stats64: dev->ndo_get_stats64 function
17631763
* Get latest stats value from the nic.
1764-
* Called with read_lock(&dev_base_lock) held for read -
1764+
* Called with rcu_read_lock() held -
17651765
* only synchronized against unregister_netdevice.
17661766
*/
17671767
static void
@@ -3090,7 +3090,7 @@ static void set_bufsize(struct net_device *dev)
30903090

30913091
/*
30923092
* nv_change_mtu: dev->change_mtu function
3093-
* Called with dev_base_lock held for read.
3093+
* Called with RTNL held for read.
30943094
*/
30953095
static int nv_change_mtu(struct net_device *dev, int new_mtu)
30963096
{

drivers/net/ethernet/sfc/efx_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ void efx_stop_all(struct efx_nic *efx)
595595
efx_stop_datapath(efx);
596596
}
597597

598-
/* Context: process, dev_base_lock or RTNL held, non-blocking. */
598+
/* Context: process, rcu_read_lock or RTNL held, non-blocking. */
599599
void efx_net_stats(struct net_device *net_dev, struct rtnl_link_stats64 *stats)
600600
{
601601
struct efx_nic *efx = efx_netdev_priv(net_dev);

drivers/net/ethernet/sfc/falcon/efx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2085,7 +2085,7 @@ int ef4_net_stop(struct net_device *net_dev)
20852085
return 0;
20862086
}
20872087

2088-
/* Context: process, dev_base_lock or RTNL held, non-blocking. */
2088+
/* Context: process, rcu_read_lock or RTNL held, non-blocking. */
20892089
static void ef4_net_stats(struct net_device *net_dev,
20902090
struct rtnl_link_stats64 *stats)
20912091
{

drivers/net/ethernet/sfc/siena/efx_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ static size_t efx_siena_update_stats_atomic(struct efx_nic *efx, u64 *full_stats
605605
return efx->type->update_stats(efx, full_stats, core_stats);
606606
}
607607

608-
/* Context: process, dev_base_lock or RTNL held, non-blocking. */
608+
/* Context: process, rcu_read_lock or RTNL held, non-blocking. */
609609
void efx_siena_net_stats(struct net_device *net_dev,
610610
struct rtnl_link_stats64 *stats)
611611
{

0 commit comments

Comments
 (0)