mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
pkt_sched: Use rcu_assign_pointer() to change dev_queue->qdisc
These pointers are RCU protected, so proper primitives should be used. Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
666d9bbedf
commit
f7a54c13c7
@@ -635,7 +635,7 @@ static struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue,
|
||||
if (qdisc == NULL)
|
||||
qdisc = &noop_qdisc;
|
||||
dev_queue->qdisc_sleeping = qdisc;
|
||||
dev_queue->qdisc = &noop_qdisc;
|
||||
rcu_assign_pointer(dev_queue->qdisc, &noop_qdisc);
|
||||
|
||||
spin_unlock_bh(root_lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user