From patchwork Mon Apr 4 21:21:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chong Li X-Patchwork-Id: 8744531 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 73BA69F336 for ; Mon, 4 Apr 2016 21:23:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0A5E2024F for ; Mon, 4 Apr 2016 21:23:38 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BADFC2013A for ; Mon, 4 Apr 2016 21:23:37 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anBwD-0004X5-Mc; Mon, 04 Apr 2016 21:21:33 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anBwC-0004Wu-NN for xen-devel@lists.xen.org; Mon, 04 Apr 2016 21:21:32 +0000 Received: from [193.109.254.147] by server-8.bemta-14.messagelabs.com id 30/6C-03645-BDAD2075; Mon, 04 Apr 2016 21:21:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjkeJIrShJLcpLzFFi42K5GHp1k+7tW0z hBmt/ylss+biYxYHR4+ju30wBjFGsmXlJ+RUJrBmzJhQVLOGqaFpa1cB4jKOLkYtDSGASo8TM 89fYQBwWgUssEmc+32MGcSQE3rFInLy1ir2LkRPIiZE4u7aBEcKulji65DgLiC0koCxx6u4ud ohRC5kkDn/7zgSSYBNQlbi66x1YkYiAtMS1z5cZQYqYBT4wShy/sQOsSFjAQuLt38usIDYLUE N/03VmEJtXwFniw70dzBDb5CROHpvMOoGRbwEjwypGjeLUorLUIl1DI72kosz0jJLcxMwcXUN DE73c1OLixPTUnMSkYr3k/NxNjMBQYQCCHYxnpzkfYpTkYFIS5b11kilciC8pP6UyI7E4I76o NCe1+BCjDAeHkgQvLzD0hASLUtNTK9Iyc4BBC5OW4OBREuH9chMozVtckJhbnJkOkTrFaMyx5 fe1tUwc26beW8skxJKXn5cqJc67A6RUAKQ0ozQPbhAsmi4xykoJ8zICnSbEU5BalJtZgir/il Gcg1FJmFcQ5B6ezLwSuH2vgE5hAjqlXhjslJJEhJRUA6NNc5Z3WoJUoPs7sZStbJ6vtfp8rfJ nXi9IFJzHduQie8Z+mdBPi/723PiQIVS5uVfkbW3+R7lq1sluF2Vc99qqH9I7O7fpmjrjv1Vb zb3l1fpSi5hndK/3uLD7jfoTQ6s8sWWpU3zmr/y/+eir4AfuTBE3EpcKBLBfW3ev0Nm7LTl81 g4tBiWW4oxEQy3mouJEAAyNN76hAgAA X-Env-Sender: lichong659@gmail.com X-Msg-Ref: server-10.tower-27.messagelabs.com!1459804890!35570010!1 X-Originating-IP: [209.85.213.178] X-SpamReason: No, hits=0.3 required=7.0 tests=MAILTO_TO_SPAM_ADDR X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4922 invoked from network); 4 Apr 2016 21:21:31 -0000 Received: from mail-ig0-f178.google.com (HELO mail-ig0-f178.google.com) (209.85.213.178) by server-10.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 4 Apr 2016 21:21:31 -0000 Received: by mail-ig0-f178.google.com with SMTP id gy3so48905027igb.1 for ; Mon, 04 Apr 2016 14:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=bOukhvsACOmbvwGXrlbySH4/lrgfPaae1YbTLki8WSU=; b=gCZtlHK2aenyYmyzT/1fYUadho2hnPuMGUciPvzUIGYOfqCkEZDKEEvnK24YNmdALP t96hmuRPMhVq2e+q3+fPuEIEHOc8uRhZnEOICvm2/LvkTYQZUTDka1q2MqWTIKe05KaE wBeRQH2OGpotu+X0NC9Jhym5TVbx0VxcSh1aO14JPcyO3Kr7pkCNPlA7n2vn8kYXLDUs H73P9cKMv+WNi2zEPapCDQPFEGgUCo9wjgEDMZmEnBHVnexkKylqctYcwgAmip/DtlB0 RZ3b5R2FuR9PiO3/3Q0fiE+Upl4peaBWaSiq4KuXKU971XxAyxKrRyKpKj26JNKYwPCB UYnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bOukhvsACOmbvwGXrlbySH4/lrgfPaae1YbTLki8WSU=; b=PhrR9HBYqN+CeTVJMXcfN1CLTs9R2oUV0CFNyvO4UZJmOAwAortXQJWHjCuXth+58U sQaPUucc+cuIBICsOHtpJbsMf6Mw9rn5WA+F9jB4NnZtVOX64N9ikdFCHC4TySZbWLDk VsCKUh3DKCIhvfoJ2OJXoGBBEUrLrQyVHUjFsPPJHGteVJXobc6gc6ohJJ/HF9MunyE1 5zzv6UrkxhgPLCxIzplxPA0HWDzC/5iawmZqekmZEdqVg2EDBZFuBGgsY2JjpQHtvn8D dM4ADj3drqolfPhlVggy/8xKWYqQrZqQ8O2hWChT6Wdh7P3t9u9/OZoQNsoQLFWkRylz KeRg== X-Gm-Message-State: AD7BkJIOS+yChT/7AHnYrA2+G0ouFl4YTMTxnu1cGqjt/whFA/LSZz0awArROh40He5cSA== X-Received: by 10.107.130.11 with SMTP id e11mr19651883iod.175.1459804890077; Mon, 04 Apr 2016 14:21:30 -0700 (PDT) Received: from chong-OptiPlex-960.seas.wustl.edu (admin998.cec.wustl.edu. [128.252.20.193]) by smtp.googlemail.com with ESMTPSA id d65sm9899775ioe.0.2016.04.04.14.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Apr 2016 14:21:28 -0700 (PDT) From: Chong Li To: xen-devel@lists.xen.org Date: Mon, 4 Apr 2016 16:21:20 -0500 Message-Id: <1459804880-1689-1-git-send-email-lichong659@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Chong Li , Sisu Xi , george.dunlap@eu.citrix.com, dario.faggioli@citrix.com, Meng Xu , jbeulich@suse.com, Chong-Li , dgolomb@seas.upenn.edu Subject: [Xen-devel] [PATCH] xen: enable per-VCPU parameter for RTDS X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, 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 From: Chong-Li Fix a bug in sched_credit.c and sched_credit2.c: in the default case of csched_dom_cntl and csched2_dom_cntl, function returns without unlocking prv->lock. Signed-off-by: Chong Li Signed-off-by: Meng Xu Signed-off-by: Sisu Xi Acked-by: Dario Faggioli --- CC: CC: CC: CC: CC: CC: --- xen/common/sched_credit.c | 1 + xen/common/sched_credit2.c | 1 + 2 files changed, 2 insertions(+) diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c index e5d15d8..fa6b7f0 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -1101,6 +1101,7 @@ csched_dom_cntl( sdom->cap = op->u.credit.cap; break; default: + spin_unlock_irqrestore(&prv->lock, flags); return -EINVAL; } diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index d48ed5a..cf444c9 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -1457,6 +1457,7 @@ csched2_dom_cntl( } break; default: + spin_unlock_irqrestore(&prv->lock, flags); return -EINVAL; }