From patchwork Sun Mar 28 11:19:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 88764 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2SCWicb015561 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 28 Mar 2010 12:33:21 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NvreH-0004VS-3V; Sun, 28 Mar 2010 12:31:25 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NvqXC-0006zK-KD for dri-devel@lists.sourceforge.net; Sun, 28 Mar 2010 11:20:02 +0000 Received-SPF: pass (sfi-mx-3.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.218.218 as permitted sender) client-ip=209.85.218.218; envelope-from=error27@gmail.com; helo=mail-bw0-f218.google.com; Received: from mail-bw0-f218.google.com ([209.85.218.218]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NvqXB-0003Oz-JE for dri-devel@lists.sourceforge.net; Sun, 28 Mar 2010 11:20:02 +0000 Received: by bwz10 with SMTP id 10so12801319bwz.2 for ; Sun, 28 Mar 2010 04:19:55 -0700 (PDT) Received: by 10.204.134.70 with SMTP id i6mr4936691bkt.74.1269775195531; Sun, 28 Mar 2010 04:19:55 -0700 (PDT) Received: from bicker ([196.43.68.224]) by mx.google.com with ESMTPS id s17sm27161024bkd.4.2010.03.28.04.19.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Mar 2010 04:19:54 -0700 (PDT) Date: Sun, 28 Mar 2010 14:19:47 +0300 From: Dan Carpenter To: David Airlie Subject: [patch] via: off by one issue Message-ID: <20100328111947.GH5069@bicker> Mail-Followup-To: Dan Carpenter , David Airlie , dri-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: 1.9 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 1.5 RCVD_IN_PSBL RBL: Received via a relay in PSBL [196.43.68.224 listed in psbl.surriel.com] 2.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 1.5 SF_NO_SPF_SPAM SF_NO_SPF_SPAM -1.8 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NvqXB-0003Oz-JE X-Mailman-Approved-At: Sun, 28 Mar 2010 12:31:23 +0000 Cc: dri-devel@lists.sourceforge.net, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org X-BeenThere: dri-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 28 Mar 2010 12:33:21 +0000 (UTC) diff --git a/drivers/gpu/drm/via/via_video.c b/drivers/gpu/drm/via/via_video.c index 6ec04ac..6efac81 100644 --- a/drivers/gpu/drm/via/via_video.c +++ b/drivers/gpu/drm/via/via_video.c @@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_ DRM_DEBUG("\n"); - if (fx->lock > VIA_NR_XVMC_LOCKS) + if (fx->lock >= VIA_NR_XVMC_LOCKS) return -EFAULT; lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock);