Skip to contentSkip to conversation

xsm: correct operation test in flask_sysctl_scheduler_op()

PATCH In review Juergen Gross 2 participants 3 messages Feb 23, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xsm: correct operation test in flask_sysctl_scheduler_op()

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.

---
 xen/xsm/flask/hooks.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
xen/xsm/flask/hooks.c +3 -3
index f63c3e2..4813623 100644
@@ -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;
     }
 }
Signature · 1 line
2.6.2
#1 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 23.02.16 at 08:35, <[email protected]> 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.

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

Jan

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 10 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 23.02.16 at 08:35, <[email protected]> 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.

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