Matt Mackall [off-list ref] :
[...]
quoted
Sorry if I was not clear: "from anywhere" meant printk issued from
any part of the kernel which can interrupt the xmit_locked section
of a qdisc_run(), i.e. printk from irq handlers.
Hrmm. Yes, that's uglier than I realized.
Perhaps there's a way to use the existing IRQ handler reentrancy
avoidance to detect that we might be about to recurse on a lock.
It would help if qdisc_restart() disabled irq until xmit_lock_owner
is set (an extra memory barrier would be required btw).
I'd say to go with in_irq() + try_lock() but one could object that
try_lock() leaves a window where a late thread could steal the
lock.
--
Ueimor