Thread (57 messages) 57 messages, 10 authors, 2010-01-16

Re: [PATCH] sky2: safer transmit ring cleaning (v4)

From: Jarek Poplawski <hidden>
Date: 2010-01-14 11:16:41

On Thu, Jan 14, 2010 at 10:14:45AM +0000, Jarek Poplawski wrote:
On Wed, Jan 13, 2010 at 07:41:48PM -0800, Stephen Hemminger wrote:
quoted
Subject: sky2: safer transmit cleanup
...
quoted
+	if (!(netif_running(dev) & netif_device_present(dev)))
This makes it safe, but it still resembles the "short term fix"
according do David's opinion.
Hmm... Actually, it's not safe, but still safer again. It looks like
David was right (this time ;-). Since netif_device_present() isn't
protected by a lock here, this is still racy against napi, since the
flag can be set between the test and the wakeup. Btw, there is even no
barrier, and in your patch this dangerous distance is made much wider.

So, now I really ;-) agree with David: this needs a proper fix.
 
Jarek P.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help