On 6/18/23 01:00, Philippe Mathieu-Daudé wrote:
case STATS_TARGET_VCPU:
add_stats_entry(result, STATS_PROVIDER_KVM,
- current_cpu->parent_obj.canonical_path,
+ cpu->parent_obj.canonical_path,
Can we get a NULL deref here ...
stats_list);
break;
default:
static void query_stats_cb(StatsResultList **result, StatsTarget
target,
@@ -4180,7 +4180,7 @@ static void query_stats_cb(StatsResultList
**result, StatsTarget target,
error_setg_errno(errp, errno, "KVM stats: ioctl failed");
return;
}
- query_stats(result, target, names, stats_fd, errp);
+ query_stats(result, target, names, stats_fd, NULL, errp);
... from here?
No, target is STATS_TARGET_VM here.
In the kernel, KVM_GET_STATS_FD could also be improved because it does
not need to take vcpu->mutex. However that would not be enough; it
would require QEMU changes anyway to remove run_on_cpu. So I'm queuing
the patch, thanks!
Paolo