From patchwork Tue Dec 21 01:41:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Airlie X-Patchwork-Id: 423191 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBL1gobb017161 for ; Tue, 21 Dec 2010 01:42:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933427Ab0LUBlx (ORCPT ); Mon, 20 Dec 2010 20:41:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28089 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933400Ab0LUBlw (ORCPT ); Mon, 20 Dec 2010 20:41:52 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBL1fk78032370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Dec 2010 20:41:46 -0500 Received: from clockmaker-el6.bne.redhat.com (dhcp-0-222.bne.redhat.com [10.64.0.222]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBL1fflx024946; Mon, 20 Dec 2010 20:41:44 -0500 From: Dave Airlie To: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.sf.net, linux-kernel@vger.kernel.org, Dave Airlie Subject: [PATCH 1/3] fb: fix overlapping test off-by-one. Date: Tue, 21 Dec 2010 11:41:15 +1000 Message-Id: <1292895677-4242-2-git-send-email-airlied@gmail.com> In-Reply-To: <1292895677-4242-1-git-send-email-airlied@gmail.com> References: <1292895677-4242-1-git-send-email-airlied@gmail.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Dec 2010 01:42:50 +0000 (UTC) diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 0e6aa3d..4ac1201 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw) if (gen->base == hw->base) return true; /* is the generic aperture base inside the hw base->hw base+size */ - if (gen->base > hw->base && gen->base <= hw->base + hw->size) + if (gen->base > hw->base && gen->base < hw->base + hw->size) return true; return false; }