lkml.org 
[lkml]   [2000]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectPATCH:
From
Date

Hi
somebody pointed out that mm->rss is defined as an unsigned
long, I think this patch is needed to do the desired effect.
I have not founded other invalid uses of mm->rss. Only that
in someplaces it is tested against (mm->rss <= 0) instead of
(mm->rss == 0). I think that the last checks are harmless.

Later, Juan.

diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/mm/memory.c working/mm/memory.c
--- base/mm/memory.c Mon May 15 21:00:33 2000
+++ working/mm/memory.c Wed Jul 12 03:55:11 2000
@@ -373,12 +373,12 @@
spin_unlock(&mm->page_table_lock);
/*
* Update rss for the mm_struct (not necessarily current->mm)
+ * Notice that rss is an unsigned long.
*/
- if (mm->rss > 0) {
+ if (mm->rss > freed)
mm->rss -= freed;
- if (mm->rss < 0)
- mm->rss = 0;
- }
+ else
+ mm->rss = 0;
}



--
In theory, practice and theory are the same, but in practice they
are different -- Larry McVoy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.024 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site