netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix a race in ks8695_poll
@ 2010-03-06  2:36 Figo.zhang
  2010-03-07 23:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Figo.zhang @ 2010-03-06  2:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Stephen Hemminger, Yegor Yefremov

fix a race at the end of NAPI processing in ks8695_poll() function.

Signed-off-by:Figo.zhang <figo1802@gmail.com>
--- 
drivers/net/arm/ks8695net.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c
index be256b3..ecd5819 100644
--- a/drivers/net/arm/ks8695net.c
+++ b/drivers/net/arm/ks8695net.c
@@ -576,9 +576,9 @@ static int ks8695_poll(struct napi_struct *napi, int budget)
 	if (work_done < budget) {
 		unsigned long flags;
 		spin_lock_irqsave(&ksp->rx_lock, flags);
+		__napi_complete(napi);
 		/*enable rx interrupt*/
 		writel(isr | mask_bit, KS8695_IRQ_VA + KS8695_INTEN);
-		__napi_complete(napi);
 		spin_unlock_irqrestore(&ksp->rx_lock, flags);
 	}
 	return work_done;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix a race in ks8695_poll
  2010-03-06  2:36 [PATCH] fix a race in ks8695_poll Figo.zhang
@ 2010-03-07 23:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-07 23:28 UTC (permalink / raw)
  To: figo1802; +Cc: netdev, shemminger, yegorslists

From: "Figo.zhang" <figo1802@gmail.com>
Date: Sat, 06 Mar 2010 10:36:02 +0800

> fix a race at the end of NAPI processing in ks8695_poll() function.
> 
> Signed-off-by:Figo.zhang <figo1802@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-07 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-06  2:36 [PATCH] fix a race in ks8695_poll Figo.zhang
2010-03-07 23:28 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).