Re: [lock validator] drivers/net/8139too.c: deadlock?

From: Jeff Garzik
Date: Thu Jan 26 2006 - 21:57:00 EST


Herbert Xu wrote:
You've got it.

rx_poll => rtl8139_rx => netif_receive_skb => ... => tcp_v4_rcv

In fact once we're at netif_receive_skb it's easy to see how we'll grab
xmit_lock again.

Prescription: Move TX timeout handling into a work queue.


This was my recommendation as well.

Using a work queue not only solves this locking problem, but it also enables the possibility of sleeping, a common operation during the hardware resets that often occur during ->tx_timeout()

Anyone who wants to make this change in a driver, don't forget that this could race with other operations, notably dev->stop() or suspend.

Jeff


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/