Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5769205pxv; Wed, 28 Jul 2021 20:25:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN+xcLU+i8xPqHaccwpySyM3J1W3Kjb4+ryXdifGoU+HbVK4G7y/xCyMDKwY1EUgW3luy9 X-Received: by 2002:a17:907:97c9:: with SMTP id js9mr2584744ejc.109.1627529113683; Wed, 28 Jul 2021 20:25:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627529113; cv=none; d=google.com; s=arc-20160816; b=KqCjA/Ls3kRmhmdCLnIEQ4tJp26Pqdeqga21fS8492i6QS81nqwwrevg/Yhkr14F2g jps304bWvC1pNgY8ZxC7iAkpmoSCJX1K8auzDUT/rZ8WYvVxBLQN3ZoFrPNfQIPgLM2u ORjDYG3/NFGRmyNo4rn/DKUnPKV5v3NahBE70+KwhQTmFrlxQPmqUBrU9UyvPbU7+tYG Yrr1f/lnljTwlsg2LlYy8RsT4Nb5Z9Y3+iTxeLFDBvqB3opqZ9OVOZRUx5S3+Yk9CBIl YUHsV0J/UD15uSCIRtCnwhDLpa/GhMJY2GzxdsYEbUIBT9ZF9mtoud1YjQpt+rCkTXig Etrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=8twslfgheGn8ASp0OKAgtTjNug3Jij+EAg+Ww9UbldA=; b=X7GQ79v8r4MGENca/rFKXkORnuOl01Vb/2OeFzlvNHPGOgc4+pydsYyWXbcN6wNtAK Uz4bjNR5x10mHvRvIxIs6u/ET0JLDwgvAIQPrPTrOtNOGc84aMjhN7PQFym6esW6zS1C k9HaXWijBA5iQ9JPgHAiSMEsxJ47XGjlyG86d5Z3SJuM6UVzcDrsyCJZJHNNb5IS7903 6WlIsizLg7GRdBfJXmu3Tmb1hdm6RoPb9++sYxBWbrPSW89WwwH5RbIrjcARSoT3wPvy fc9CwdzSw8vI5G9piVrUoaOQ4s4xRsUAJZTK32YeShtTaqbSKKGyGaLqFCWe87UXlf2f 31bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q22si1563106edw.208.2021.07.28.20.24.50; Wed, 28 Jul 2021 20:25:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233540AbhG2DWd (ORCPT + 99 others); Wed, 28 Jul 2021 23:22:33 -0400 Received: from mga07.intel.com ([134.134.136.100]:18011 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233297AbhG2DWb (ORCPT ); Wed, 28 Jul 2021 23:22:31 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="276576559" X-IronPort-AV: E=Sophos;i="5.84,276,1620716400"; d="scan'208";a="276576559" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 20:22:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,276,1620716400"; d="scan'208";a="517969699" Received: from louislifei-optiplex-7050.sh.intel.com (HELO louislifei-OptiPlex-7050) ([10.239.154.151]) by fmsmga002.fm.intel.com with ESMTP; 28 Jul 2021 20:22:26 -0700 Date: Thu, 29 Jul 2021 11:22:11 +0800 From: Li Fei1 To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, shuox.liu@gmail.com, reinette.chatre@intel.com, zhi.a.wang@intel.com, yu1.wang@intel.com Subject: Re: [PATCH] virt: acrn: Do hcall_destroy_vm() before resource release Message-ID: <20210729032211.GA10306@louislifei-OptiPlex-7050> References: <20210722062736.15050-1-fei1.li@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 27, 2021 at 10:47:58PM +0800, Greg Kroah-Hartman wrote: > On Thu, Jul 22, 2021 at 02:27:36PM +0800, Fei Li wrote: > > From: Shuo Liu > > > > The ACRN hypervisor has scenarios which could run a real-time guest VM. > > The real-time guest VM occupies dedicated CPU cores, be assigned with > > dedicated PCI devices. It can run without the Service VM after boot up. > > hcall_destroy_vm() returns failure when a real-time guest VM refuses. > > The clearing of flag ACRN_VM_FLAG_DESTROYED causes some kernel resource > > double-freed in a later acrn_vm_destroy(). > > > > Do hcall_destroy_vm() before resource release to drop this chance to > > destroy the VM if hypercall fails. > > > > Fixes: 9c5137aedd11 ("virt: acrn: Introduce VM management interfaces") > > Signed-off-by: Shuo Liu > > Signed-off-by: Fei Li > > --- > > Do you also want this backported to older kernels? If so, you need to > put a cc: stable in here, right? I'll go add it myself, but be more > careful next time please. yes, thanks for your kind reminder. I will pay great attention next time. > > greg k-h