From patchwork Wed Dec 17 15:40:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 42383 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4772826C76 for ; Wed, 17 Dec 2014 15:42:56 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id q1sf10238440lam.6 for ; Wed, 17 Dec 2014 07:42:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-post:list-help :list-subscribe:mime-version:content-type:content-transfer-encoding :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=Sg8Jt5fjCpDlvAbfmugvDkYW1uVIj//SGTdVYHwVp0A=; b=Neby+BGuLXSajI7hm4agGc30LXW2fx8D+Gm7nYw1kSDCjQ6MUNRNqrrFBtZ74zckIC dwOxPS7wtfijASEr2rvgam1nJ1XyZDrFkkRTRaB0/1/YBAqHCpP4ReW8qXbG53JEaED6 XjZNtWQbefpKhK5iTyeINc08/NRU+YH8ZQ3fUZ8ZXHvbzVbGdrHOegoH8cTSGHCYHUiF zfDRV1CF6Y4grcZWoXFS9eqLo8ATtLrJvt4iYXcNCkvnvLbCx6pkTURedLLwUpisG7tr HYR4kps3/1siicX+ZyOQtAQHvKu6MKhOor2Tk0tqNO8dGpEqH5cJCb9LoqmhYsY7v3Sn 7dOg== X-Gm-Message-State: ALoCoQlYtvh9pH7WeweRYBRV5QOqWh11y2zVBouR8LEl+pssjSH5sNhmmJEFJvwWf6Xwz2eR6VuH X-Received: by 10.180.189.116 with SMTP id gh20mr1442451wic.2.1418830975185; Wed, 17 Dec 2014 07:42:55 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.37 with SMTP id 5ls1093401laz.81.gmail; Wed, 17 Dec 2014 07:42:54 -0800 (PST) X-Received: by 10.152.6.41 with SMTP id x9mr2086291lax.86.1418830974858; Wed, 17 Dec 2014 07:42:54 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id b2si4271440lbm.20.2014.12.17.07.42.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Dec 2014 07:42:54 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id gq15so13515078lab.18 for ; Wed, 17 Dec 2014 07:42:54 -0800 (PST) X-Received: by 10.112.98.99 with SMTP id eh3mr6260118lbb.32.1418830974770; Wed, 17 Dec 2014 07:42:54 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp1402665lbb; Wed, 17 Dec 2014 07:42:54 -0800 (PST) X-Received: by 10.140.90.47 with SMTP id w44mr46580091qgd.4.1418830973407; Wed, 17 Dec 2014 07:42:53 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id 65si4968587qgx.47.2014.12.17.07.42.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 17 Dec 2014 07:42:53 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y1GiV-00023P-3B; Wed, 17 Dec 2014 15:40:47 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y1GiT-00023K-PJ for xen-devel@lists.xenproject.org; Wed, 17 Dec 2014 15:40:45 +0000 Received: from [85.158.143.35] by server-1.bemta-4.messagelabs.com id 5E/1A-09842-DF3A1945; Wed, 17 Dec 2014 15:40:45 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-13.tower-21.messagelabs.com!1418830834!8971511!1 X-Originating-IP: [209.85.212.177] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 7676 invoked from network); 17 Dec 2014 15:40:44 -0000 Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by server-13.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 17 Dec 2014 15:40:44 -0000 Received: by mail-wi0-f177.google.com with SMTP id l15so16543873wiw.10 for ; Wed, 17 Dec 2014 07:40:34 -0800 (PST) X-Received: by 10.194.201.137 with SMTP id ka9mr74872405wjc.66.1418830834459; Wed, 17 Dec 2014 07:40:34 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id lg7sm6584310wic.0.2014.12.17.07.40.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Dec 2014 07:40:33 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 17 Dec 2014 15:40:15 +0000 Message-Id: <1418830815-4720-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.3 Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH for 4.5] xen/arm: Initialize the domain vgic lock X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: The domain vgic lock is used uninitialized. Signed-off-by: Julien Grall --- This is a bug fix for Xen 4.5 and Xen 4.4. The vgic lock is used unitialized. Luckily we only use the field "raw" which is reset to 0 during the domain allocation. There is no harm to apply for Xen 4.5 because it will correctly set the spin_lock structure for a later usage. --- xen/arch/arm/vgic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 97061ce..b8bd38b 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -90,6 +90,8 @@ int domain_vgic_init(struct domain *d) return -ENODEV; } + spin_lock_init(&d->arch.vgic.lock); + d->arch.vgic.shared_irqs = xzalloc_array(struct vgic_irq_rank, DOMAIN_NR_RANKS(d)); if ( d->arch.vgic.shared_irqs == NULL )