All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "George Dunlap" <george.dunlap@citrix.com>,
	"Dario Faggioli" <dfaggioli@suse.com>,
	"Juergen Gross" <jgross@suse.com>,
	"René Winther Højgaard" <renewin@proton.me>
Subject: [PATCH] sched: correct sched_move_domain()'s cleanup path
Date: Mon, 4 Dec 2023 11:57:30 +0100	[thread overview]
Message-ID: <2b59a3a2-d2f3-4d29-ab40-3f630fd497fe@suse.com> (raw)

It is only in the error case that we want to clean up the new pool's
scheduler data; in the success case it's rather the old scheduler's
data which needs cleaning up.

Reported-by: René Winther Højgaard <renewin@proton.me>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>

--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -810,7 +810,7 @@ int sched_move_domain(struct domain *d,
     for ( unit = old_units; unit; )
     {
         if ( unit->priv )
-            sched_free_udata(c->sched, unit->priv);
+            sched_free_udata(ret ? c->sched : old_ops, unit->priv);
         old_unit = unit;
         unit = unit->next_in_list;
         xfree(old_unit);


             reply	other threads:[~2023-12-04 10:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 10:57 Jan Beulich [this message]
2023-12-04 13:00 ` [PATCH] sched: correct sched_move_domain()'s cleanup path George Dunlap
2023-12-04 13:47   ` Juergen Gross
2023-12-04 13:55     ` George Dunlap
2023-12-04 14:10   ` Juergen Gross
2023-12-04 14:18     ` George Dunlap
2023-12-04 14:39       ` Jan Beulich
2023-12-04 14:44         ` Juergen Gross
2023-12-04 19:33           ` George Dunlap
2023-12-05  7:26             ` Juergen Gross
2023-12-04 14:38     ` Jan Beulich
2023-12-04 14:40       ` Juergen Gross

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=2b59a3a2-d2f3-4d29-ab40-3f630fd497fe@suse.com \
    --to=jbeulich@suse.com \
    --cc=dfaggioli@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=jgross@suse.com \
    --cc=renewin@proton.me \
    --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.