On 2025-03-27 09: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 <jbeul...@suse.com>

Reviewed-by: Jason Andryuk <jason.andr...@amd.com>

This fixes the currently broken logic with has_num, so I think it's a good change.

I think the gov_num==0 no longer happens with HWP because it registers a governor:

    return cpufreq_register_governor(&cpufreq_gov_hwp);

Unfortunately, I no longer have an HWP-capable system to verify.

Regards,
Jason

Reply via email to