net: qdisc: use rcu prefix and silence sparse warnings
Add __rcu notation to qdisc handling by doing this we can make smatch output more legible. And anyways some of the cases should be using rcu_dereference() see qdisc_all_tx_empty(), qdisc_tx_chainging(), and so on. Also *wake_queue() API is commonly called from driver timer routines without rcu lock or rtnl lock. So I added rcu_read_lock() blocks around netif_wake_subqueue and netif_tx_wake_queue. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d1015645dd
commit
46e5da40ae
@@ -783,7 +783,7 @@ static void dev_deactivate_queue(struct net_device *dev,
|
||||
struct Qdisc *qdisc_default = _qdisc_default;
|
||||
struct Qdisc *qdisc;
|
||||
|
||||
qdisc = dev_queue->qdisc;
|
||||
qdisc = rtnl_dereference(dev_queue->qdisc);
|
||||
if (qdisc) {
|
||||
spin_lock_bh(qdisc_lock(qdisc));
|
||||
|
||||
@@ -876,7 +876,7 @@ static void dev_init_scheduler_queue(struct net_device *dev,
|
||||
{
|
||||
struct Qdisc *qdisc = _qdisc;
|
||||
|
||||
dev_queue->qdisc = qdisc;
|
||||
rcu_assign_pointer(dev_queue->qdisc, qdisc);
|
||||
dev_queue->qdisc_sleeping = qdisc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user