Skip to contentSkip to conversation

qdisc_restart locking bug?

DISCUSSION Jeff Garzik 2 participants 2 messages Nov 15, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Hello!

Quoted 2 lines

When dev->hard_start_xmit() is called from qdisc_restart(), dev->queue_lock is 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_restart need s/spin_lock/spin_lock_bh/ for dev->queue_lock?

It need not.

Alexey