[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/events/fifo: Add missing hotplug notifier transition



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 <konrad.wilk@xxxxxxxxxx>
> Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Cc: David Vrabel <david.vrabel@xxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Anna-Maria Gleixner <anna-maria@xxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.