Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e1a80f11f89f318e892694b501735abb51ef626
Commit:     3e1a80f11f89f318e892694b501735abb51ef626
Parent:     7ae5a761d2ffc4cf7d3248e09f4d3da234434f30
Author:     Lennert Buytenhek <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 8 16:26:23 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Thu Feb 8 15:29:00 2007 +0000

    [ARM] 4153/1: fix consistent_sync() off-by-one BUG check
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mm/consistent.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
index 166aee1..1f9f94f 100644
--- 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 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to