[libvirt] [PATCH] perf: remote: Compare perf nparams against the correct constant

Nitesh Konkar posted 1 patch 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1489665315-25070-1-git-send-email-niteshkonkar.libvirt@gmail.com
daemon/remote.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] perf: remote: Compare perf nparams against the correct constant
Posted by Nitesh Konkar 7 years, 1 month ago
Currently 'virsh perf domain' errors out as the perf nparams is
incorrectly compared against REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX
instead of REMOTE_DOMAIN_PERF_EVENTS_MAX.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
---
 daemon/remote.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemon/remote.c b/daemon/remote.c
index f2b9b9a..1c9708c 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -3105,7 +3105,7 @@ remoteDispatchDomainGetPerfEvents(virNetServerPtr server ATTRIBUTE_UNUSED,
     if (virDomainGetPerfEvents(dom, &params, &nparams, args->flags) < 0)
         goto cleanup;
 
-    if (nparams > REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX) {
+    if (nparams > REMOTE_DOMAIN_PERF_EVENTS_MAX) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
         goto cleanup;
     }
-- 
1.9.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] perf: remote: Compare perf nparams against the correct constant
Posted by Michal Privoznik 7 years, 1 month ago
On 03/16/2017 12:55 PM, Nitesh Konkar wrote:
> Currently 'virsh perf domain' errors out as the perf nparams is
> incorrectly compared against REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX
> instead of REMOTE_DOMAIN_PERF_EVENTS_MAX.
>
> Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
> ---
>  daemon/remote.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/daemon/remote.c b/daemon/remote.c
> index f2b9b9a..1c9708c 100644
> --- a/daemon/remote.c
> +++ b/daemon/remote.c
> @@ -3105,7 +3105,7 @@ remoteDispatchDomainGetPerfEvents(virNetServerPtr server ATTRIBUTE_UNUSED,
>      if (virDomainGetPerfEvents(dom, &params, &nparams, args->flags) < 0)
>          goto cleanup;
>
> -    if (nparams > REMOTE_DOMAIN_MEMORY_PARAMETERS_MAX) {
> +    if (nparams > REMOTE_DOMAIN_PERF_EVENTS_MAX) {
>          virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("nparams too large"));
>          goto cleanup;
>      }
>

ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list