Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1045209imm; Thu, 6 Sep 2018 14:27:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaIkO6tIavOGwd9GH3FcSFhNGELLCj7A9qxQ7Sht9k8tV889/ZazAOpvoJH3uFnIrJKA6PJ X-Received: by 2002:a62:219b:: with SMTP id o27-v6mr5033888pfj.235.1536269271644; Thu, 06 Sep 2018 14:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536269271; cv=none; d=google.com; s=arc-20160816; b=wYWV0L4lySiBmc7rH+XuuUCGXGzgiISHei+XYcM8uyWyV/usxmRHfFp14JLKPu3Lka B+jHgnxat90t+Ld96bSeU4D8nwf83Vs7jnoILyv1wForQGMH4c1iGwzmzRJ3hJrB0EB/ tLSnE7nLT8vl21XsW2JfomstPlJ4Oyf1txIYxiHmWiaL8zbL1pyd/3DMQKS9heHlZ2V0 jNsVVGk1HQRGkmyLZGF2gdTcvW/1A1W/CLoEy4hzsD2KNx9cwXWwwvZFrKNpCNvsrx/U 2NWrhHbHj27Gdoacy5fChL+M0GjaCIZdr266+NomWr56E1DP7qHGChCVF+Ogh4wtW+/5 vkVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=VjUwwoNsR7yFbp4WPkFvsjQPOXopN+AZdvetspiGvlw=; b=SxTcBVTpSr1ACODZl7pPBfLVQijRpKYUt52RIXDseNIeXjzgs5RQ3/RSJ5KDr8lM8f vuUnS0/00O5BfM0zpUSMMqw5lf5+aKzxj4fhkJoU1BnmIchnHy4tpNa00OmNaHIZs6Pp afDFyj88G7EHFjFy3GlD55oLAzHRAce9xPi6KKZdw2dTyxIFV8K8TNlasGLFTaFTEOXL eeXP2KhlHJ/qeWNTxcGAQSu90pmZHCmMfZ0q/dHooiF7TZYdQlew95fij3x0E3j8ShSb ZtJsqOCnd79EPzkZ8DRuUd5VoJhVdJmonLiC/gCwvP66Z9r08JYVts61EXTCvWpA23CC cMXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@aepfle.de header.s=strato-dkim-0002 header.b=cCGF4d1Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13-v6si6166248pgk.127.2018.09.06.14.27.36; Thu, 06 Sep 2018 14:27:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@aepfle.de header.s=strato-dkim-0002 header.b=cCGF4d1Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729977AbeIGBJG (ORCPT + 99 others); Thu, 6 Sep 2018 21:09:06 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.162]:30279 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbeIGBJF (ORCPT ); Thu, 6 Sep 2018 21:09:05 -0400 X-Greylist: delayed 50275 seconds by postgrey-1.27 at vger.kernel.org; Thu, 06 Sep 2018 21:09:05 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1536265912; s=strato-dkim-0002; d=aepfle.de; h=References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=VjUwwoNsR7yFbp4WPkFvsjQPOXopN+AZdvetspiGvlw=; b=cCGF4d1QqJP6kGpyLqc805D6HP1Y0ZJbDRl68gRSWHpZW4Knae4w4GU70M8BS4Nb+w RcH8Y0fzjXixICS1jEZDQAFX7LTSiFODXfGO9Nl0FPw/cj0IDERc1XZ9jg7J7stFFtZi dnUT25AfvFg82Wp2uK204599v74r0fWcxjo8FetzfvC+sIsughZZCInqg1T/nVOtCpoA jqtdqULoX/Pt0WagBFw3t5HtdHhwrB+wNMeQvh9tge1tnHIBnDRsPzchxF/yQE5dAoTk JEH7b5NriflcPkF5rt8gNOGg7BGrTNTWRGrjExxIxOhMf3WsjdzLgmsLOxEJVLFhF2wM GFCg== X-RZG-AUTH: ":P2EQZWCpfu+qG7CngxMFH1J+3q8wa/QED/SSGq+wjGiUC4oc0Nr2ihluivsAQtyRsdRVZ54BGpAypu4eYvjwzPAqxRcXNDW+" X-RZG-CLASS-ID: mo00 Received: from sender by smtp.strato.de (RZmta 44.0 AUTH) with ESMTPSA id L0862bu86KVpCFZ (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 6 Sep 2018 22:31:51 +0200 (CEST) Date: Thu, 6 Sep 2018 22:31:45 +0200 From: Olaf Hering To: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org, Juergen Gross , open list Subject: Re: [PATCH v2] xen: avoid crash in disable_hotplug_cpu Message-ID: <20180906223145.37f7009b.olaf@aepfle.de> In-Reply-To: References: <20180906063712.28639-1-olaf@aepfle.de> X-Mailer: Claws Mail 3.16.1 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/tskpqat.bDZCNZqA9o0sYsv"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/tskpqat.bDZCNZqA9o0sYsv Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Thu, 6 Sep 2018 14:45:57 -0400 schrieb Boris Ostrovsky : > 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() !=3D 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 --Sig_/tskpqat.bDZCNZqA9o0sYsv Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSkRyP6Rn//f03pRUBdQqD6ppg2fgUCW5GOsQAKCRBdQqD6ppg2 floXAKCrnwaC4KbLH/1h4SPHYTIFty1K1QCgqtpEYxNU7utPdsHHHNjNKGFbODU= =6dXi -----END PGP SIGNATURE----- --Sig_/tskpqat.bDZCNZqA9o0sYsv--