[PATCH] x86 mmiotrace: fix range test

From: Stuart Bennett
Date: Tue Apr 28 2009 - 15:28:59 EST


Matching on (addr == (p->addr + p->len)) causes problems when mappings
are adjacent

Signed-off-by: Stuart Bennett <stuart@xxxxxxxxxxxxxxx>
Acked-by: Pekka Paalanen <pq@xxxxxx>
---
arch/x86/mm/kmmio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index 4f115e0..50dc802 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -87,7 +87,7 @@ static struct kmmio_probe *get_kmmio_probe(unsigned long addr)
{
struct kmmio_probe *p;
list_for_each_entry_rcu(p, &kmmio_probes, list) {
- if (addr >= p->addr && addr <= (p->addr + p->len))
+ if (addr >= p->addr && addr < (p->addr + p->len))
return p;
}
return NULL;
--
1.5.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/