projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ae5a76
)
[ARM] 4153/1: fix consistent_sync() off-by-one BUG check
author
Lennert Buytenhek
<buytenh@wantstofly.org>
Thu, 8 Feb 2007 15:26:23 +0000
(16:26 +0100)
committer
Russell King
<rmk+kernel@arm.linux.org.uk>
Thu, 8 Feb 2007 15:29:00 +0000
(15:29 +0000)
In consistent_sync(), start + size can end up pointing one byte
beyond the end of the direct RAM mapping. We shouldn't BUG() when
this happens.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/consistent.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm/mm/consistent.c
b/arch/arm/mm/consistent.c
index 166aee13c4b1bd40e963e6b14132796d04aec757..1f9f94f9af4bac8d99137cad55204afcc279c0e4 100644
(file)
--- a/
arch/arm/mm/consistent.c
+++ b/
arch/arm/mm/consistent.c
@@
-485,7
+485,7
@@
void consistent_sync(const void *start, size_t size, int direction)
{
const void *end = start + size;
- BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(end));
+ BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(end
- 1
));
switch (direction) {
case DMA_FROM_DEVICE: /* invalidate only */