Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752113AbcCKL0S (ORCPT ); Fri, 11 Mar 2016 06:26:18 -0500 Received: from www.linutronix.de ([62.245.132.108]:36886 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751936AbcCKL0M (ORCPT ); Fri, 11 Mar 2016 06:26:12 -0500 Date: Fri, 11 Mar 2016 12:26:08 +0100 (CET) From: Anna-Maria Gleixner To: David Vrabel cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Boris Ostrovsky , rt@linutronix.de Subject: Re: [Xen-devel] [PATCH] xen/events/fifo: Add missing hotplug notifier transition In-Reply-To: <56E2A3B6.2060208@citrix.com> Message-ID: References: <1457686822-39117-1-git-send-email-anna-maria@linutronix.de> <56E2A3B6.2060208@citrix.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1056 Lines: 31 On Fri, 11 Mar 2016, David Vrabel wrote: > 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: Thanks for the explanation > 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. This would not be necessary, because if the CPU_UP_PREPARE of this notifier fails, the CPU_UP_CANCELLED of this notifier will not be invoked. Anna-Maria