All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: xen-devel@lists.xenproject.org, Juergen Gross <jgross@suse.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] xen: avoid crash in disable_hotplug_cpu
Date: Thu, 6 Sep 2018 22:31:45 +0200	[thread overview]
Message-ID: <20180906223145.37f7009b.olaf@aepfle.de> (raw)
In-Reply-To: <b7306d7f-e827-6556-e1bb-4b934a162e46@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

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.

Olaf

[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2018-09-06 20:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  6:37 [PATCH v2] xen: avoid crash in disable_hotplug_cpu Olaf Hering
2018-09-06 18:45 ` Boris Ostrovsky
2018-09-06 20:31   ` Olaf Hering [this message]
2018-09-06 22:53     ` Boris Ostrovsky
2018-09-06 22:53     ` Boris Ostrovsky
2018-09-07  5:15     ` Juergen Gross
2018-09-07  5:15     ` Juergen Gross
2018-09-07  5:45     ` Olaf Hering
2018-09-07  5:45     ` Olaf Hering
2018-09-06 20:31   ` Olaf Hering
2018-09-06 18:45 ` Boris Ostrovsky
  -- strict thread matches above, loose matches on Subject: below --
2018-09-06  6:37 Olaf Hering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180906223145.37f7009b.olaf@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.