Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=56d6d1a73d9e5ddd9eb1a7baeeda30803ba44879
Commit:     56d6d1a73d9e5ddd9eb1a7baeeda30803ba44879
Parent:     77926826f301fbd8ed96d3cd9ff17a5b59560dfb
Author:     Manish Ahuja <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 10 05:03:45 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Jul 26 16:12:17 2007 +1000

    [POWERPC] Fix loop with unsigned long counter variable
    
    This fixes a possible infinite loop when the unsigned long counter "i"
    is used in lmb_add_region() in the following for loop:
    
    for (i = rgn->cnt-1; i >= 0; i--)
    
    by making the loop counter "i" be signed.
    
    Signed-off-by: Manish Ahuja <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/mm/lmb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index e3a1e8d..8f4d2dc 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -138,8 +138,8 @@ void __init lmb_analyze(void)
 static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base,
                                  unsigned long size)
 {
-       unsigned long i, coalesced = 0;
-       long adjacent;
+       unsigned long coalesced = 0;
+       long adjacent, i;
 
        /* First try and coalesce this LMB with another. */
        for (i=0; i < rgn->cnt; i++) {
-
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