Thread (5 messages) 5 messages, 3 authors, 2007-05-29

Re: [PATCH] b44: netpoll locking fix

From: Francois Romieu <romieu@fr.zoreil.com>
Date: 2007-05-29 22:24:53

Stephen Hemminger [off-list ref] :
â
œ...]
quoted hunk ↗ jump to hunk
Better to just get rid of using the lock as a transmit lock and
use netif_tx_lock instead.
--- a/drivers/net/b44.c	2007-05-29 09:51:43.000000000 -0700
+++ b/drivers/net/b44.c	2007-05-29 14:26:03.000000000 -0700
@@ -607,6 +607,7 @@ static void b44_tx(struct b44 *bp)
 {
 	u32 cur, cons;
 
+	netif_tx_lock(bp->dev);
 	cur  = br32(bp, B44_DMATX_STAT) & DMATX_STAT_CDMASK;
 	cur /= sizeof(struct dma_desc);
 
(damn, you are quick)

I am not completely convinced.

1. netpoll_send_skb (calls netif_tx_trylock(dev))
   -> netpoll_poll(np)
      -> poll_napi(np)
         -> np->dev->poll(np->dev, &budget) ( == b44_poll)
            -> b44_tx
               -> netif_tx_lock(bp->dev) *deadlock*

2. Hunk #5 clashes with John Linville's wireless-dev#master

3. Moderately appropriate for 2.6.22-rc (imho, fwiw, etc.)

-- 
Ueimor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help