From nobody Wed May 8 13:35:18 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1564375081; cv=none; d=zoho.com; s=zohoarc; b=V2phlxOwzALoTFqqDquhyZ8sl4Mo2sNrwTLsQZrYTCkp+jRyYf9xMupHuMsdymquhIzgviPLvUgeinG7m4ykJ6kQfu0vFRexSzRTG7kBEoRp/JrzyFkw2MNzyOlSfiaVOgdtfkkHAlUbNCVIfGMQpaa0fsXbNNFWOtuH13RJPYI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564375081; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=QHZPabNF2MdGNtAusQcY0QezPJ+lOp9ksyrKxEzHh14=; b=MBBt+zO93ypVctztfyT0lTmKB5U8kQxkI3ufkh7Jx0Z+7g3K4I0gxDC59VlfThSz2k/MEZqPPOHmeAiSjGaozWpFAh72AkYmYOYSUaCamrmQSAqwxgCqtaxqErvOdiPQpPlXMX1BIPuNAybVFJ+w4EtWG0IDq4EfA4Ov2KeQ4I0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1564375081148501.273428544479; Sun, 28 Jul 2019 21:38:01 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hrxOj-0004n6-Kn; Mon, 29 Jul 2019 04:36:33 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hrxOi-0004n1-Jx for xen-devel@lists.xenproject.org; Mon, 29 Jul 2019 04:36:32 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6dce2308-b1ba-11e9-a026-c3e35348a00f; Mon, 29 Jul 2019 04:36:28 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id F4013AC2E; Mon, 29 Jul 2019 04:36:26 +0000 (UTC) X-Inumbo-ID: 6dce2308-b1ba-11e9-a026-c3e35348a00f X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Mon, 29 Jul 2019 06:36:24 +0200 Message-Id: <20190729043624.16965-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH] xen: don't longjmp() after domain_crash() in check_wakeup_from_wait() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Continuing on the stack saved by __prepare_to_wait() on the wrong cpu is rather dangerous. Instead of doing so just call the scheduler again as it already is happening in the similar case in __prepare_to_wait() when doing the setjmp() would be wrong. Signed-off-by: Juergen Gross --- xen/common/wait.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/common/wait.c b/xen/common/wait.c index 3fc5f68611..24716e7676 100644 --- a/xen/common/wait.c +++ b/xen/common/wait.c @@ -196,6 +196,11 @@ void check_wakeup_from_wait(void) { gdprintk(XENLOG_ERR, "vcpu affinity lost\n"); domain_crash(curr->domain); + + /* Re-initiate scheduler and don't longjmp(). */ + raise_softirq(SCHEDULE_SOFTIRQ); + for ( ; ; ) + do_softirq(); } =20 /* --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel