swap.c: Fix off by one
authorAlan Cox <alan@linux.intel.com>
Sat, 3 Jan 2015 15:49:23 +0000 (15:49 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 3 Jan 2015 15:49:23 +0000 (15:49 +0000)
Kernel/swap.c

index f9b9476..8f206f0 100644 (file)
@@ -172,7 +172,7 @@ static ptptr swapvictim(ptptr p, int notself)
                        }
                }
                c++;
-               if (c > ptab_end)
+               if (c == ptab_end)
                        c = ptab;
        }
        while (c != getproc_nextp);