Message ID | 1456222181-12105-1-git-send-email-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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; > } > } >
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; } }
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> --- 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(-)