OSDN Git Service

pxa168: close race between napi and irq activation
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Sun, 30 Nov 2014 10:49:36 +0000 (11:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Dec 2014 05:33:19 +0000 (21:33 -0800)
commit8961b1940200ac5e91bee1c1bc69086365e1b7c9
treee8d73b2709ca3fab49db6d00ee2eace768a4f407
parent769e0de6475e5512f88bfb4dbf6d6323fd23514f
pxa168: close race between napi and irq activation

In pxa168_eth_open() the irqs are enabled before napi. This opens a tiny time
window in which the irq handler is processed, disables irqs but then is not able
to schedule the not yet activated napi, leaving irqs disabled forever (since
irqs are reenabled in napi poll function).
Fix this race by activating napi before irqs are activated.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/pxa168_eth.c