Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=801916c1b369b637ce799e6c71a94963ff63df79
Commit:     801916c1b369b637ce799e6c71a94963ff63df79
Parent:     6442eea937ef797d4b66733f49c82e2fdc2aca6f
Author:     Andrew Hastings <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 18:04:33 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 20:15:22 2007 +0200

    x86: fix off-by-one in find_next_zero_string
    
    Fix an off-by-one error in find_next_zero_string which prevents
    allocating the last bit.
    
    [ tglx: arch/x86 adaptation ]
    
    Signed-off-by: Andrew Hastings <[EMAIL PROTECTED]> on behalf of Cray Inc.
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/lib/bitstr_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/bitstr_64.c b/arch/x86/lib/bitstr_64.c
index 2467660..7445caf 100644
--- a/arch/x86/lib/bitstr_64.c
+++ b/arch/x86/lib/bitstr_64.c
@@ -14,7 +14,7 @@ find_next_zero_string(unsigned long *bitmap, long start, long 
nbits, int len)
        
        /* could test bitsliced, but it's hardly worth it */
        end = n+len;
-       if (end >= nbits) 
+       if (end > nbits)
                return -1; 
        for (i = n+1; i < end; i++) { 
                if (test_bit(i, bitmap)) {  
-
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