From: Wei Liu Subject: Re: [PATCHv2 net-next] xen-netback: fix race between napi_complete() and interrupt handler Date: Fri, 16 May 2014 10:01:46 +0100 Message-ID: <20140516090146.GA18268@zion.uk.xensource.com> References: <1400174228-16572-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , Ian Campbell , Wei Liu To: David Vrabel Return-path: Received: from smtp02.citrix.com ([66.165.176.63]:53394 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754556AbaEPJBs (ORCPT ); Fri, 16 May 2014 05:01:48 -0400 Content-Disposition: inline In-Reply-To: <1400174228-16572-1-git-send-email-david.vrabel@citrix.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, May 15, 2014 at 06:17:08PM +0100, David Vrabel wrote: > 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 I think this patch should be applied to 'net' tree. Wei.