From patchwork Mon Apr 4 22:45:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chong Li X-Patchwork-Id: 8744831 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 544FF9F38C for ; Mon, 4 Apr 2016 22:47:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C8E72024F for ; Mon, 4 Apr 2016 22:47:48 +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 5D5222022A for ; Mon, 4 Apr 2016 22:47:47 +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 1anDFN-00021Z-4T; Mon, 04 Apr 2016 22:45:25 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anDFL-00021R-Uc for xen-devel@lists.xen.org; Mon, 04 Apr 2016 22:45:24 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id E3/91-25417-38EE2075; Mon, 04 Apr 2016 22:45:23 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsVyMfT+at2md0z hBgs3q1gs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBlzb05hK1jCXTGr9z97A+N6zi5GLg4hgSmM Eienn2YBcVgELrFI7F1xnRHEkRB4xyIx+fNp9i5GTiAnRuLbt6/MEHalxOlNUxhBbCEBZYlTd 3exQ4xawCSxd/8dsASbgKrE1V3vWEBsEQFpiWufL4NNZRb4wChx/MYOJpCEsICFxNu/l1lBbB aghqePj4HFeQWcJT59aWSD2CYncfLYZNYJjHwLGBlWMWoUpxaVpRbpGprrJRVlpmeU5CZm5ug aGpjq5aYWFyemp+YkJhXrJefnbmIEhgsDEOxgvHja8xCjJAeTkigvw2umcCG+pPyUyozE4oz4 otKc1OJDjDIcHEoSvOpvgXKCRanpqRVpmTnAwIVJS3DwKInwHnkDlOYtLkjMLc5Mh0idYjTm2 PL72lomjm1T761lEmLJy89LlRLnjQOZJABSmlGaBzcIFlGXGGWlhHkZgU4T4ilILcrNLEGVf8 UozsGoJMx7HGQhT2ZeCdy+V0CnMAGdUi8MdkpJIkJKqoFxq/OVR3OdIjsCI07qzGbLLmdSb0i /zrfMosu8b86eDeKvn/1mfx7znV3lDlP2M0ufPeJ5ew1udyR1RV271vLv8Z70rBC10JeWS3Wn qrs6rQnoqJBcbdxroanA3ZlvMIHX6nOXtjxT0p4cjcQFIqYCa/pqNr5uWSv/2XuBRl3YdZm3j b0mu5VYijMSDbWYi4oTAVbzg7ejAgAA X-Env-Sender: lichong659@gmail.com X-Msg-Ref: server-9.tower-206.messagelabs.com!1459809921!32972833!1 X-Originating-IP: [209.85.223.171] 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 5204 invoked from network); 4 Apr 2016 22:45:22 -0000 Received: from mail-io0-f171.google.com (HELO mail-io0-f171.google.com) (209.85.223.171) by server-9.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 4 Apr 2016 22:45:22 -0000 Received: by mail-io0-f171.google.com with SMTP id g185so167820283ioa.2 for ; Mon, 04 Apr 2016 15:45:22 -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=rxVrnMyO+VyVqBbu4z7qtHJvQHZShUG+1gHyiXw7S84=; b=dudwZ7AbTdcWmOU+AwANVgoWGUHsh22Einu+zctzmu2ferT9nOY7y+39e3Uvsv2Spb 6YYjpeKzTacCxB16uXIGK1RvpNS3Cl8WdnQhg94c68VBeJPA+74yW4iUkjoN8S2K/zXA pBdhHxk8hwH7DwZOHEe4Sbj3UHq8sBCuhAnMbhpSa3zpvEVJlk7a/xzpiPIoz3w0EC11 SHBYdB7rOe5SfahLL3hujwEKK12RsbRfm/2Is3CvJ0+ePBkmn/f7P5sZ9f4t1juQeGKk DVO6tVShHoV6MiXbU36bJJ2RDFoCVC8MZpdlw14Ml1of253XhOhssM473zKx8w2KPwWW xJ+Q== 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=rxVrnMyO+VyVqBbu4z7qtHJvQHZShUG+1gHyiXw7S84=; b=NWVIWN0yYFoGmbpdEylaRmQ0WxmvxZMbmbQZC+Yd63YD9qrVXxtDu5j6v0/PcCNmuT Rw+5+hG2xNCDpWngcw7iMlZF/2yDY/Ngwy84qezr6NMYNjGBnE5nFd5g+L/C8aH85m0u OJePi798oT960+1d+R2qVqD+Aih5jEuI3YjQmqaxiOOcOQbDd4INVSZAl6dpvfvzZyOO tzcAMLbqOuNUYzz9/nLj0ze6Sbq9bEe2/uc6q4339CgCUyGyktBD19Z/I/9wfiBj8lHT AueFXYhY6NSPSsdIePhE9TfqvrraaAO8MP84zMnHM/1SIy96FnwTODcrtQDj1v+6K13o xNog== X-Gm-Message-State: AD7BkJJzUz6PHf+Zc+PH/skQqIQ8VUuudthJbZPRkrew4oCJoB19m+o03m/y2SFYnAPNjw== X-Received: by 10.107.11.150 with SMTP id 22mr16701903iol.61.1459809921330; Mon, 04 Apr 2016 15:45:21 -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 j7sm6179073ige.5.2016.04.04.15.45.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Apr 2016 15:45:20 -0700 (PDT) From: Chong Li To: xen-devel@lists.xen.org Date: Mon, 4 Apr 2016 17:45:13 -0500 Message-Id: <1459809913-1958-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 Commit f7b87b0745b4 ("enable per-VCPU parameter for RTDS") introduced a bug: it made it possible, in Credit and Credit2, when doing domain or vcpu parameters' manipulation, to leave the hypervisor with a spinlock held. Fix it. 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; }