Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752151AbcCKKyD (ORCPT ); Fri, 11 Mar 2016 05:54:03 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:59280 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751359AbcCKKx4 (ORCPT ); Fri, 11 Mar 2016 05:53:56 -0500 X-IronPort-AV: E=Sophos;i="5.24,320,1454976000"; d="scan'208";a="344883464" Subject: Re: [Xen-devel] [PATCH] xen/events/fifo: Add missing hotplug notifier transition To: Anna-Maria Gleixner , References: <1457686822-39117-1-git-send-email-anna-maria@linutronix.de> CC: David Vrabel , , Boris Ostrovsky , From: David Vrabel X-Enigmail-Draft-Status: N1110 Message-ID: <56E2A3B6.2060208@citrix.com> Date: Fri, 11 Mar 2016 10:53:42 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <1457686822-39117-1-git-send-email-anna-maria@linutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1603 Lines: 51 On 11/03/16 09:00, Anna-Maria Gleixner wrote: > The evtchn_fifo_cpu_notification() hotplug callback lacks handling of > the CPU_UP_CANCELED case. That means, if CPU_UP_PREPARE fails, the > handle of the fifo events is not dropped. > > Add handling for CPU_UP_CANCELED transition to drop the fifo events > handle. __evtchn_fifo_handle_events() does not releases resources, it processes any pending events for this CPU. This patch would only be necessary if a CPU in CPU_UP_CANCELED state may have had unmasked interrupts. If so you would need: case CPU_UP_CANCELED: if (per_cpu(cpu_control_block, cpu)) __evtchn_fifo_handle_events(cpu, true); break; To handle the case where the control block allocation or initialization failed during CPU_UP_PREPARE. David > > Cc: Konrad Rzeszutek Wilk > Cc: Boris Ostrovsky > Cc: David Vrabel > Cc: xen-devel@lists.xenproject.org > Signed-off-by: Anna-Maria Gleixner > --- > drivers/xen/events/events_fifo.c | 1 + > 1 file changed, 1 insertion(+) > > --- a/drivers/xen/events/events_fifo.c > +++ b/drivers/xen/events/events_fifo.c > @@ -432,6 +432,7 @@ static int evtchn_fifo_cpu_notification( > ret = evtchn_fifo_alloc_control_block(cpu); > break; > case CPU_DEAD: > + case CPU_UP_CANCELED: > __evtchn_fifo_handle_events(cpu, true); > break; > default: > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >