qdisc_restart locking bug?
Subsystems (2)
When qdisc_restart() is called from qdisc_run(), dev->queue_lock is obtained via spin_lock_bh().
When dev->hard_start_xmit() is called from qdisc_restart(), dev->queue_lock is dropped, and then re-acquired using only spin_lock().
So, doesn't qdisc_restart need s/spin_lock/spin_lock_bh/ for dev->queue_lock?
When looking at the dev_queue_xmit -> qdisc_run -> qdisc_restart call path, it seems so to me.
Jeff
Hello!
Quoted 2 lines
When
dev->hard_start_xmit()is called fromqdisc_restart(),dev->queue_lockis dropped,
Using spin_unlock(). softirqs are not enabled.
Quoted 1 line
and then re-acquired using only
spin_lock().
Yes.
Quoted 2 lines
So, doesn't
qdisc_restartneed s/spin_lock/spin_lock_bh/ fordev->queue_lock?
It need not.
Alexey