xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Juergen Gross <jgross@suse.com>, xen-devel@lists.xen.org
Cc: george.dunlap@eu.citrix.com, dgdegra@tycho.nsa.gov,
	dario.faggioli@citrix.com
Subject: Re: [PATCH v2] xen: use XEN_SYSCTL_SCHEDOP_* for sysctl operation checks
Date: Tue, 23 Feb 2016 10:44:12 +0000	[thread overview]
Message-ID: <56CC37FC.7020103@citrix.com> (raw)
In-Reply-To: <1456222181-12105-1-git-send-email-jgross@suse.com>

On 23/02/16 10:09, Juergen Gross wrote:
> In flask_sysctl_scheduler_op() and sched_adjust_global() the test for
> the desired operation is done with the wrong constants. While the
> values are correct, the names are not.
> 
> Correct the error message for the case of an unknown operation in
> flask_sysctl_scheduler_op(), too.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Good catch.

Reviewed-by: George Dunlap <george.dunlap@citrix.com>

> ---
> V2: correct sched_adjust_global(), too as requested by Jan Beulich
> ---
>  xen/common/schedule.c | 4 ++--
>  xen/xsm/flask/hooks.c | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/common/schedule.c b/xen/common/schedule.c
> index 27695e3..434dcfc 100644
> --- a/xen/common/schedule.c
> +++ b/xen/common/schedule.c
> @@ -1171,8 +1171,8 @@ long sched_adjust_global(struct xen_sysctl_scheduler_op *op)
>      if ( rc )
>          return rc;
>  
> -    if ( (op->cmd != XEN_DOMCTL_SCHEDOP_putinfo) &&
> -         (op->cmd != XEN_DOMCTL_SCHEDOP_getinfo) )
> +    if ( (op->cmd != XEN_SYSCTL_SCHEDOP_putinfo) &&
> +         (op->cmd != XEN_SYSCTL_SCHEDOP_getinfo) )
>          return -EINVAL;
>  
>      pool = cpupool_get_by_id(op->cpupool_id);
> diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
> index f63c3e2..4813623 100644
> --- a/xen/xsm/flask/hooks.c
> +++ b/xen/xsm/flask/hooks.c
> @@ -529,14 +529,14 @@ static int flask_sysctl_scheduler_op(int op)
>  {
>      switch ( op )
>      {
> -    case XEN_DOMCTL_SCHEDOP_putinfo:
> +    case XEN_SYSCTL_SCHEDOP_putinfo:
>          return domain_has_xen(current->domain, XEN__SETSCHEDULER);
>  
> -    case XEN_DOMCTL_SCHEDOP_getinfo:
> +    case XEN_SYSCTL_SCHEDOP_getinfo:
>          return domain_has_xen(current->domain, XEN__GETSCHEDULER);
>  
>      default:
> -        printk("flask_domctl_scheduler_op: Unknown op %d\n", op);
> +        printk("flask_sysctl_scheduler_op: Unknown op %d\n", op);
>          return -EPERM;
>      }
>  }
> 

      reply	other threads:[~2016-02-23 10:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 10:09 [PATCH v2] xen: use XEN_SYSCTL_SCHEDOP_* for sysctl operation checks Juergen Gross
2016-02-23 10:44 ` George Dunlap [this message]

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=56CC37FC.7020103@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).