diff options
author | David Vrabel <david.vrabel@citrix.com> | 2014-05-16 12:26:04 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-16 16:27:23 -0400 |
commit | 0d08fceb2e21c30ca3e1e462e678723f806acf18 (patch) | |
tree | 4a890dcf919f80ffb067351bfc45cc63dab35791 /drivers/net/xen-netback/common.h | |
parent | 202630b445d2618d94e4f099567fcee5618dab27 (diff) | |
download | op-kernel-dev-0d08fceb2e21c30ca3e1e462e678723f806acf18.zip op-kernel-dev-0d08fceb2e21c30ca3e1e462e678723f806acf18.tar.gz |
xen-netback: fix race between napi_complete() and interrupt handler
When the NAPI budget was not all used, xenvif_poll() would call
napi_complete() /after/ enabling the interrupt. This resulted in a
race between the napi_complete() and the napi_schedule() in the
interrupt handler. The use of local_irq_save/restore() avoided by
race iff the handler is running on the same CPU but not if it was
running on a different CPU.
Fix this properly by calling napi_complete() before reenabling
interrupts (in the xenvif_napi_schedule_or_enable_irq() call).
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/common.h')
-rw-r--r-- | drivers/net/xen-netback/common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/xen-netback/common.h b/drivers/net/xen-netback/common.h index 630a3fc..0d4a285 100644 --- a/drivers/net/xen-netback/common.h +++ b/drivers/net/xen-netback/common.h @@ -226,7 +226,7 @@ int xenvif_map_frontend_rings(struct xenvif *vif, grant_ref_t rx_ring_ref); /* Check for SKBs from frontend and schedule backend processing */ -void xenvif_check_rx_xenvif(struct xenvif *vif); +void xenvif_napi_schedule_or_enable_events(struct xenvif *vif); /* Prevent the device from generating any further traffic. */ void xenvif_carrier_off(struct xenvif *vif); |