lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] xen: avoid crash in disable_hotplug_cpu
From
Date
On 06/09/18 22:31, Olaf Hering wrote:
> Am Thu, 6 Sep 2018 14:45:57 -0400
> schrieb Boris Ostrovsky <boris.ostrovsky@oracle.com>:
>
>> On 09/06/2018 02:37 AM, Olaf Hering wrote:
>>> The command 'xl vcpu-set 0 0', issued in dom0, will crash dom0:
>
>>> This happens because handle_vcpu_hotplug_event is called twice. In the
>>> first iteration cpu_present is still true, in the second iteration
>>> cpu_present is false which causes get_cpu_device to return NULL.
>>> In case of cpu#0, cpu_online is apparently always true.
>
>> I think we should check both this and num_online_cpus() != 0.
>
> This can not possibly help. cpu#0 is the first one that goes offline.
> IF cpu0_hotpluggable is broken, then only "if (!cpu) return;" can help.

We should add the Xen PV guest test to arch_register_cpu() and switch
cpu0_hotpluggable off.


Juergen

\
 
 \ /
  Last update: 2018-09-07 07:16    [W:0.061 / U:2.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site