netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: david.vrabel@citrix.com
Cc: wei.liu2@citrix.com, netdev@vger.kernel.org,
	xen-devel@lists.xenproject.org, ian.campbell@citrix.com
Subject: Re: [PATCHv3 net] xen-netback: fix race between napi_complete() and interrupt handler
Date: Fri, 16 May 2014 16:27:59 -0400 (EDT)	[thread overview]
Message-ID: <20140516.162759.1966063113769346927.davem@davemloft.net> (raw)
In-Reply-To: <5375F5CC.6000000@citrix.com>

From: David Vrabel <david.vrabel@citrix.com>
Date: Fri, 16 May 2014 12:26:04 +0100

> Dave, can you take this instead:
> 
> 8<--------------
> 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>

Applied, thanks everyone.

      reply	other threads:[~2014-05-16 20:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 11:20 [PATCHv3 net] xen-netback: fix race between napi_complete() and interrupt handler David Vrabel
2014-05-16 11:21 ` Wei Liu
2014-05-16 11:26   ` David Vrabel
2014-05-16 20:27     ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140516.162759.1966063113769346927.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=david.vrabel@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).