lkml.org 
[lkml]   [2010]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area
Date
End address of the vm area is .start + bytes -1., not start + byte.
This patch fixes that issue by doing an inclusive comparison with
tmp->da_start. This issue was preventing allocate an area of size
exactly the same than the free area. I did no change the value of
da_end of each vm area because it is used to get area size in
several places.

Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---
arch/arm/plat-omap/iovmm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 8ce0de2..24ca9c4 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -292,7 +292,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da,
if (prev_end >= start)
break;

- if (start + bytes < tmp->da_start)
+ if (start + bytes <= tmp->da_start)
goto found;

if (flags & IOVMF_DA_ANON)
--
1.6.3.3


\
 
 \ /
  Last update: 2010-08-17 18:45    [W:0.029 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site