From: Figo.zhang Date: Fri, 5 Mar 2010 16:36:02 +0000 (+0000) Subject: fix a race in ks8695_poll X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b96b894c518bc7399e6b86b635b5e8cd7356a8e9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git fix a race in ks8695_poll fix a race at the end of NAPI processing in ks8695_poll() function. Signed-off-by:Figo.zhang Signed-off-by: David S. Miller --- diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index 8ca639127dbc..a1d4188c430b 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c @@ -575,9 +575,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;