From patchwork Tue Feb 23 07:35:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 8388391 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A49E3C0553 for ; Tue, 23 Feb 2016 07:37:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D76F420461 for ; Tue, 23 Feb 2016 07:37:54 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0827E20454 for ; Tue, 23 Feb 2016 07:37:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aY7Vh-0002jH-Fp; Tue, 23 Feb 2016 07:35:53 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aY7Vg-0002jC-Qq for xen-devel@lists.xen.org; Tue, 23 Feb 2016 07:35:52 +0000 Received: from [85.158.137.68] by server-2.bemta-3.messagelabs.com id EC/62-03293-7DB0CC65; Tue, 23 Feb 2016 07:35:51 +0000 X-Env-Sender: jgross@suse.com X-Msg-Ref: server-14.tower-31.messagelabs.com!1456212951!24296593!1 X-Originating-IP: [195.135.220.15] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27192 invoked from network); 23 Feb 2016 07:35:51 -0000 Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by server-14.tower-31.messagelabs.com with DHE-RSA-CAMELLIA256-SHA encrypted SMTP; 23 Feb 2016 07:35:51 -0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AFACCACDA; Tue, 23 Feb 2016 07:35:50 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xen.org Date: Tue, 23 Feb 2016 08:35:48 +0100 Message-Id: <1456212948-23993-1-git-send-email-jgross@suse.com> X-Mailer: git-send-email 2.6.2 Cc: Juergen Gross , dgdegra@tycho.nsa.gov Subject: [Xen-devel] [PATCH] xsm: correct operation test in flask_sysctl_scheduler_op() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- xen/xsm/flask/hooks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } }