On Thu, Mar 06, 2008 at 08:59:55AM -0500, jamal wrote:
Every netdevice after register_netdevice() has its queue_lock and
ingress_lock initialized with the same static lock_class_keys, so unless
changed later, these locks are treated by lockdep as 2 global locks. So,
taking such locks with different order should be reported. This really
happens in act_mirred, and I don't know yet, why this wasn't reported
earlier.
Of course, if there are two different devices this could be safe, but
not always (e.g. thread1 has dev_eth0->ingress_lock and wants
dev_eth1->queue_lock, thread2 has dev_eth1->ingress_lock, wants
dev_eth0->qdisc_lock, and thread3 has dev_eth0->qdisc_lock and wants
dev_eth0->ingress_lock). With ifb this shouldn't be the case, but
anyway we have to tell lockdep that ifb uses a different pair of locks.
My patch teaches lockdep about queue_lock, but after rethinking it
seems it's not enough, and I'll have to update this patch with
ingress_lock too.
Denys, I'll have to read your script yet, so you can wait with this
patching (unless you've started already - anyway this patch shouldn't
be harmful).
Thanks,
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html