[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100114111636.GB7210@ff.dom.local>
Date: Thu, 14 Jan 2010 11:16:36 +0000
From: Jarek Poplawski <jarkao2@...il.com>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: Michael Breuer <mbreuer@...jas.com>,
David Miller <davem@...emloft.net>, mikem@...g3k.org,
flyboy@...il.com, rjw@...k.pl, netdev@...r.kernel.org
Subject: Re: [PATCH] sky2: safer transmit ring cleaning (v4)
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:
> > Subject: sky2: safer transmit cleanup
...
> > + 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists