diff mbox

xsm: correct operation test in flask_sysctl_scheduler_op()

Message ID 1456212948-23993-1-git-send-email-jgross@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jürgen Groß Feb. 23, 2016, 7:35 a.m. UTC
In flask_sysctl_scheduler_op() 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, too.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/xsm/flask/hooks.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jan Beulich Feb. 23, 2016, 9:29 a.m. UTC | #1
>>> On 23.02.16 at 08:35, <JGross@suse.com> wrote:
> In flask_sysctl_scheduler_op() 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, too.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Would you mind fixing this everywhere, not just in XSM code? At
least sched_adjust_global() appears to have the same issue.

Jan
Jürgen Groß Feb. 23, 2016, 9:55 a.m. UTC | #2
On 23/02/16 10:29, Jan Beulich wrote:
>>>> On 23.02.16 at 08:35, <JGross@suse.com> wrote:
>> In flask_sysctl_scheduler_op() 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, too.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
> 
> Would you mind fixing this everywhere, not just in XSM code? At
> least sched_adjust_global() appears to have the same issue.

Aah, okay. Yes, I can do it.


Juergen
diff mbox

Patch

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;
     }
 }