From patchwork Tue Aug 17 03:51:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Guzman Lugo, Fernando" X-Patchwork-Id: 119851 X-Patchwork-Delegate: hiroshi.doyu@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7H3qUNl032067 for ; Tue, 17 Aug 2010 03:52:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755826Ab0HQDv7 (ORCPT ); Mon, 16 Aug 2010 23:51:59 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:38493 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796Ab0HQDv6 convert rfc822-to-8bit (ORCPT ); Mon, 16 Aug 2010 23:51:58 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o7H3ps4s018464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Aug 2010 22:51:54 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o7H3psl4004729; Mon, 16 Aug 2010 22:51:54 -0500 (CDT) Received: from dlee75.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o7H3ps8q012217; Mon, 16 Aug 2010 22:51:54 -0500 (CDT) Received: from dlee06.ent.ti.com ([157.170.170.11]) by dlee75.ent.ti.com ([157.170.170.72]) with mapi; Mon, 16 Aug 2010 22:51:54 -0500 From: "Guzman Lugo, Fernando" To: "linux-omap@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "Hiroshi.DOYO@nokia.com" , "Kanigeri, Hari" Date: Mon, 16 Aug 2010 22:51:53 -0500 Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area Thread-Topic: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area Thread-Index: AQHLPb89dO8xxwhi9kWHPF9veuQYsw== Message-ID: <496565EC904933469F292DDA3F1663E602CA4D8949@dlee06.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 17 Aug 2010 03:52:30 +0000 (UTC) diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index b8bcad5..8745d4e 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c @@ -295,7 +295,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, prev_end = 0; list_for_each_entry(tmp, &obj->mmap, list) { - if ((prev_end <= start) && (start + bytes < tmp->da_start)) + if ((prev_end <= start) && (start + bytes <= tmp->da_start)) goto found; if (flags & IOVMF_DA_ANON)