- bug-in-mm-thrashc-function-grab_swap_token.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Bug in mm/thrash.c function grab_swap_token()
has been removed from the -mm tree.  Its filename was
     bug-in-mm-thrashc-function-grab_swap_token.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: Bug in mm/thrash.c function grab_swap_token()
From: Mika Kukkonen <mikukkon@xxxxxxxxxxxxxxxxxx>

Following bug was uncovered by compiling with '-W' flag:

  CC      mm/thrash.o
mm/thrash.c: In function â??grab_swap_tokenâ??:
mm/thrash.c:52: warning: comparison of unsigned expression < 0 is always false

Variable token_priority is unsigned, so decrementing first and then
checking the result does not work; fixed by reversing the test, patch
attached (compile tested only).

I am not sure if likely() makes much sense in this new situation, but
I'll let somebody else to make a decision on that.

Signed-off-by: Mika Kukkonen <mikukkon@xxxxxx>
Cc: Rik van Riel <riel@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/thrash.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff -puN mm/thrash.c~bug-in-mm-thrashc-function-grab_swap_token mm/thrash.c
--- a/mm/thrash.c~bug-in-mm-thrashc-function-grab_swap_token
+++ a/mm/thrash.c
@@ -48,9 +48,8 @@ void grab_swap_token(void)
 		if (current_interval < current->mm->last_interval)
 			current->mm->token_priority++;
 		else {
-			current->mm->token_priority--;
-			if (unlikely(current->mm->token_priority < 0))
-				current->mm->token_priority = 0;
+			if (likely(current->mm->token_priority > 0))
+				current->mm->token_priority--;
 		}
 		/* Check if we deserve the token */
 		if (current->mm->token_priority >
_

Patches currently in -mm which might be from mikukkon@xxxxxxxxxxxxxxxxxx are

origin.patch
couple-fixes-to-fs-ecryptfs-inodec.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux