From patchwork Wed May 8 02:33:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 16736 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f197.google.com (mail-ye0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A330625CEA for ; Wed, 8 May 2013 02:34:56 +0000 (UTC) Received: by mail-ye0-f197.google.com with SMTP id q11sf1448258yen.0 for ; Tue, 07 May 2013 19:34:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=aW8cPakPwxQGOK402fobxqDwLGpQTmVTjRdK5qVtNSM=; b=gMsUlQNgEWEAjbZTKfmxAn/v+/5Sse+Q0SW4ZE3xmKl1YwUWqqolSjfxcO5J6X/vO5 Uq09ksk3mI/zCxtRpq9KBXRctwqPi1a+02Xf/DH4UbUTbl2J7hUx4/4C8Xuq0bBBBGmw qImYIxZmV9nJ5T4WMy38b0XhI7ZN+jzzkjkt7h+zP7ga7nVglUq5jXhMmlpw22eP5/GJ 7s9Ak2euKZd3LisC4gekRszpk3eCadtgqSp1Jp0uBM1ApXkHLLeatu575TaBQljBlbPy IMiFnhiuBNhcaznUKkrUQFrvQai5Sa8awSsmGwlRbq8ChwfkccRnzvmFItV1k+0C7vzQ LFrA== X-Received: by 10.224.200.202 with SMTP id ex10mr6488919qab.8.1367980476459; Tue, 07 May 2013 19:34:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.14.195 with SMTP id r3ls668054qec.63.gmail; Tue, 07 May 2013 19:34:36 -0700 (PDT) X-Received: by 10.52.26.228 with SMTP id o4mr2697736vdg.73.1367980476237; Tue, 07 May 2013 19:34:36 -0700 (PDT) Received: from mail-vb0-x230.google.com (mail-vb0-x230.google.com [2607:f8b0:400c:c02::230]) by mx.google.com with ESMTPS id by3si10533539vdc.30.2013.05.07.19.34.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 May 2013 19:34:36 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::230 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::230; Received: by mail-vb0-f48.google.com with SMTP id q16so1150387vbe.21 for ; Tue, 07 May 2013 19:34:36 -0700 (PDT) X-Received: by 10.220.189.9 with SMTP id dc9mr3154905vcb.8.1367980476114; Tue, 07 May 2013 19:34:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp130990veb; Tue, 7 May 2013 19:34:35 -0700 (PDT) X-Received: by 10.180.185.207 with SMTP id fe15mr6858026wic.33.1367980472471; Tue, 07 May 2013 19:34:32 -0700 (PDT) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [2a00:1450:400c:c05::22f]) by mx.google.com with ESMTPS id s2si1339686wix.6.2013.05.07.19.34.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 May 2013 19:34:32 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22f is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c05::22f; Received: by mail-wi0-f175.google.com with SMTP id h11so4483748wiv.14 for ; Tue, 07 May 2013 19:34:32 -0700 (PDT) X-Received: by 10.194.59.132 with SMTP id z4mr7126114wjq.57.1367980471970; Tue, 07 May 2013 19:34:31 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id v6sm6823630wiy.11.2013.05.07.19.34.30 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 May 2013 19:34:31 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: Stefano.Stabellini@eu.citrix.com, patches@linaro.org, ian.campbell@citrix.com, Julien Grall Subject: [PATCH V2 01/33] xen/arm: lr must be included in range [0-nr_lr( Date: Wed, 8 May 2013 03:33:21 +0100 Message-Id: <20a655a5c38d2ef5aff133d87b00a7f6dd42b4e6.1367979526.git.julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-Gm-Message-State: ALoCoQldN5+8NKvn1vgSacTdWh4q5wf+kVI3RzJXrooMRrG4W86xc06Y1tqwGlJzKiE1fjVlFD4k X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::230 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Julien Grall Acked-by: Ian Campbell Changes in v2: - Typo in the commit message --- xen/arch/arm/gic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 61de230..6d71aae 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -512,7 +512,9 @@ static inline void gic_set_lr(int lr, unsigned int virtual_irq, { int maintenance_int = GICH_LR_MAINTENANCE_IRQ; - BUG_ON(lr > nr_lrs); + BUG_ON(lr >= nr_lrs); + BUG_ON(lr < 0); + BUG_ON(state & ~(GICH_LR_STATE_MASK<