From: "Anthony PERARD" <anthony.perard@vates.tech>
To: "Jan Beulich" <jbeulich@suse.com>
Cc: "Juergen Gross" <jgross@suse.com>, xen-devel@lists.xenproject.org
Subject: Re: Ping: [PATCH] libxc/PM: correct (not just) error handling in xc_get_cpufreq_para()
Date: Mon, 07 Apr 2025 12:45:14 +0000 [thread overview]
Message-ID: <Z_PI2UNn2C4GKqYw@l14> (raw)
In-Reply-To: <e0028d85-668a-464b-aac5-ac8a79ea9bf5@suse.com>
On Mon, Apr 07, 2025 at 01:38:24PM +0200, Jan Beulich wrote:
> On 27.03.2025 14:32, Jan Beulich wrote:
> > From their introduction all xc_hypercall_bounce_pre() uses, when they
> > failed, would properly cause exit from the function including cleanup,
> > yet without informing the caller of the failure. Purge the unlock_1
> > label for being both pointless and mis-named.
> >
> > An earlier attempt to switch to the usual split between return value and
> > errno wasn't quite complete.
> >
> > HWP work made the cleanup of the "available governors" array
> > conditional, neglecting the fact that the condition used may not be the
> > condition that was used to allocate the buffer (as the structure field
> > is updated upon getting back EAGAIN). Throughout the function, use the
> > local variable being introduced to address that.
> >
> > Fixes: 4513025a8790 ("libxc: convert sysctl interfaces over to hypercall buffers")
> > Amends: 73367cf3b4b4 ("libxc: Fix xc_pm API calls to return negative error and stash error in errno")
> > Fixes: 31e264c672bc ("pmstat&xenpm: Re-arrage for cpufreq union")
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> May I ask for an ack or comments towards what needs changing?
Calling xc_get_cpufreq_para with:
user_para = {
.cpu_num = 0,
.freq_num = 0,
.gov_num = 9,
};
seems broken. It's looks like the `scaling_available_governors` bounce
buffer is going to be used without been allocated properly handled, with
this patch.
Cheers,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2025-04-07 12:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-27 13:32 [PATCH] libxc/PM: correct (not just) error handling in xc_get_cpufreq_para() Jan Beulich
2025-03-28 10:51 ` Anthony PERARD
2025-03-28 11:06 ` Jan Beulich
2025-04-07 11:38 ` Ping: " Jan Beulich
2025-04-07 12:45 ` Anthony PERARD [this message]
2025-04-07 13:23 ` Jan Beulich
2025-04-07 15:23 ` Anthony PERARD
2025-04-07 15:38 ` Jan Beulich
2025-04-08 9:59 ` Anthony PERARD
2025-04-08 10:47 ` Jan Beulich
2025-04-08 11:47 ` Anthony PERARD
2025-04-07 20:36 ` Jason Andryuk
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=Z_PI2UNn2C4GKqYw@l14 \
--to=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--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.