From nobody Tue Nov 11 08:45:25 2025 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=1569395184; cv=none; d=zoho.com; s=zohoarc; b=YumxlUuZXyDWpNID8Fbog120MCGUOqgsCt59yp+2uN3wxN9dluvN2XhObO6HXTnHcPJaQawwp3YzSYxpAuYQWxezwCAWul0UUXJGnBdmAt/CS03j6RaooSYTZ7NxasUEXTvYfJ2f99/GdP53BdisWAymnr7FIclg4lttB9uG9fo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569395184; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=DQJJ/6a65gXJqvnyE0oTkmVPSsNJGX23CBmJ1xrnFFs=; b=g11a2FStZYDYiGaJL7w6uK4WPUT1LTx0QIDru3U0QJelnH21iAIS4ke98I9ihuqpgyZrutt40mtwMpoPejK+WL/olhft/OGDQIXXe4rrAb7LtjC0ttN26rZysTjngkaqSjaX3jZHCZ5bNTofxvmHeGQFk1nEZwhtDOk+c24J5Yc= 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 1569395184325752.6137763710091; Wed, 25 Sep 2019 00:06:24 -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 1iD1ML-00080q-Nc; Wed, 25 Sep 2019 07:05:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iD1MK-00080f-5t for xen-devel@lists.xenproject.org; Wed, 25 Sep 2019 07:05:08 +0000 Received: from mx1.suse.de (unknown [195.135.220.15]) by localhost (Halon) with ESMTPS id cdd82066-df62-11e9-bf31-bc764e2007e4; Wed, 25 Sep 2019 07:05:07 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3B5A6AF10; Wed, 25 Sep 2019 07:05:06 +0000 (UTC) X-Inumbo-ID: cdd82066-df62-11e9-bf31-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 25 Sep 2019 09:05:03 +0200 Message-Id: <20190925070503.13850-3-jgross@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190925070503.13850-1-jgross@suse.com> References: <20190925070503.13850-1-jgross@suse.com> Subject: [Xen-devel] [PATCH 2/2] xen/sched: fix freeing per-vcpu data in sched_move_domain() 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 , George Dunlap , Dario Faggioli 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" In case of an allocation error of per-vcpu data in sched_move_domain() the already allocated data is freed just using xfree(). This is wrong as some schedulers need to do additional operations (e.g. the arinc653 scheduler needs to remove the vcpu-data from a list). So instead xfree() make use of the sched_free_vdata() hook. Signed-off-by: Juergen Gross Reviewed-by: Dario Faggioli Reviewed-by: Jan Beulich --- xen/common/schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 13b5ffc7cf..13c17fe944 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -386,7 +386,7 @@ int sched_move_domain(struct domain *d, struct cpupool = *c) if ( vcpu_priv[v->vcpu_id] =3D=3D NULL ) { for_each_vcpu ( d, v ) - xfree(vcpu_priv[v->vcpu_id]); + sched_free_vdata(c->sched, vcpu_priv[v->vcpu_id]); xfree(vcpu_priv); sched_free_domdata(c->sched, domdata); return -ENOMEM; --=20 2.16.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel