From: Fernando Guzman Lugo <x0095840@ti.com> To: <linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org> Cc: <Hiroshi.DOYU@nokia.com>, <h-kanigeri2@ti.com>, Fernando Guzman Lugo <x0095840@ti.com> Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area Date: Tue, 17 Aug 2010 11:56:01 -0500 [thread overview] Message-ID: <1282064161-21056-1-git-send-email-x0095840@ti.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Fernando Guzman Lugo <x0095840@ti.com> To: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Cc: Hiroshi.DOYU@nokia.com, h-kanigeri2@ti.com, Fernando Guzman Lugo <x0095840@ti.com> Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area Date: Tue, 17 Aug 2010 11:56:01 -0500 [thread overview] Message-ID: <1282064161-21056-1-git-send-email-x0095840@ti.com> (raw) 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
next reply other threads:[~2010-08-17 16:42 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-08-17 16:56 Fernando Guzman Lugo [this message] 2010-08-17 16:56 ` [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area Fernando Guzman Lugo 2010-10-10 16:38 ` Felipe Contreras -- strict thread matches above, loose matches on Subject: below -- 2010-08-17 3:51 Guzman Lugo, Fernando 2010-08-17 3:51 ` Guzman Lugo, Fernando 2010-08-17 4:48 ` Guzman Lugo, Fernando 2010-08-17 4:48 ` Guzman Lugo, Fernando 2010-08-17 5:27 ` Hiroshi DOYU 2010-08-17 6:08 ` Guzman Lugo, Fernando
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1282064161-21056-1-git-send-email-x0095840@ti.com \ --to=x0095840@ti.com \ --cc=Hiroshi.DOYU@nokia.com \ --cc=h-kanigeri2@ti.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.