From patchwork Fri Dec 9 00:59:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9467319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D749E60231 for ; Fri, 9 Dec 2016 01:02:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1FAF28628 for ; Fri, 9 Dec 2016 01:02:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C353428618; Fri, 9 Dec 2016 01:02:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 65BEA28618 for ; Fri, 9 Dec 2016 01:02:06 +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 1cF9XD-0000Cm-MW; Fri, 09 Dec 2016 00:59:35 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF9XC-0000Cg-Ol for xen-devel@lists.xenproject.org; Fri, 09 Dec 2016 00:59:34 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id 3E/54-14841-5F10A485; Fri, 09 Dec 2016 00:59:33 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBIsWRWlGSWpSXmKPExsVybKJsh+5XRq8 Ig0PbRCy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oy7Dw6zF0xgrXi5NKSB8T9zFyMXh5DAVEaJ c09fM0E4s5kkPh46D+RwcLAIaElMn1HaxcjJwSZgKPH3ySY2kLAEkL3kMwdIWERASeLeqslMI DazgIHElmc/2EFsYQF3iQ037zCC2LwC3hK7PjaygdiiAroSh/79YYOIC0qcnPmEBaJXS2L59G 1gtoRAhsS8njmsELaXxKIbl6BsNYmr5zYxT2Dkn4WkfRaS9gWMTKsYNYpTi8pSi3SNTPWSijL TM0pyEzNzdA0NTPVyU4uLE9NTcxKTivWS83M3MQJDrZ6BgXEH4652v0OMkhxMSqK8TcAQFOJL yk+pzEgszogvKs1JLT7EKMPBoSTBu40BKCdYlJqeWpGWmQMMepi0BAePkgjvw/+eEUK8xQWJu cWZ6RCpU4y6HAfer3jKJMSSl5+XKiXO+w9khgBIUUZpHtwIWAReYpSVEuZlZGBgEOIpSC3KzS xBlX/FKM7BqCTMuxFkCk9mXgncpldARzABHTHvhjvIESWJCCmpBsY4nwvp/un7Cm6pFz68q+R 8u/aK3qPuzs4rV4w2XtALmpWq5Zhs9vnWhXcOrzf6NSt/Wb9j/eqZXxMWvlLXWB22v/DtwRUT 9gqoPzSXv+R0xsbrn0O/b7mOuqH0cslrTBdeyyVYn8sN9Z/wzu/J67AXzJVJv0R47vL4/Fuzr e9VY4yKG8+rj+eVWIozEg21mIuKEwEeZhfJuwIAAA== X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-16.tower-206.messagelabs.com!1481245171!58636580!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.0.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22332 invoked from network); 9 Dec 2016 00:59:32 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-16.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 9 Dec 2016 00:59:32 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C7C0203A5; Fri, 9 Dec 2016 00:59:30 +0000 (UTC) Received: from [10.1.10.56] (96-82-76-110-static.hfc.comcastbusiness.net [96.82.76.110]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3DA31200E6; Fri, 9 Dec 2016 00:59:29 +0000 (UTC) Date: Thu, 8 Dec 2016 16:59:28 -0800 (PST) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: xen-devel@lists.xenproject.org Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Cc: julien.grall@arm.com, sstabellini@kernel.org Subject: [Xen-devel] [PATCH] missing vgic_unlock_rank in gic_remove_irq_from_guest 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add missing vgic_unlock_rank on the error path in gic_remove_irq_from_guest. CID: 1381843 Signed-off-by: Stefano Stabellini Reviewed-by: Julien Grall diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 63c744a..a5348f2 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -205,7 +205,10 @@ int gic_remove_irq_from_guest(struct domain *d, unsigned int virq, */ if ( test_bit(_IRQ_INPROGRESS, &desc->status) || !test_bit(_IRQ_DISABLED, &desc->status) ) + { + vgic_unlock_rank(v_target, rank, flags); return -EBUSY; + } } clear_bit(_IRQ_GUEST, &desc->status);