All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Juan J. Quintela" <quintela@fi.udc.es>
To: lkml <linux-kernel@vger.rutgers.edu>,
	linux-mm@kvack.org, linus@orzan.fi.udc.es
Subject: PATCH:
Date: 12 Jul 2000 18:24:39 +0200	[thread overview]
Message-ID: <yttpuoj8gfs.fsf@serpe.mitica> (raw)

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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

             reply	other threads:[~2000-07-12 16:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-12 16:24 Juan J. Quintela [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-10-01 13:46 Issues with a Doc Milplus Nicolas Pouillon
2004-10-01 13:57 ` David Woodhouse
2004-10-01 14:27   ` Nicolas Pouillon
2004-10-02 13:55     ` Patch ! Nicolas Pouillon
2004-10-02 20:42       ` Thomas Gleixner
2004-10-03  1:11         ` Nicolas Pouillon
     [not found]         ` <20041003030653.2e0452a7.nipo@ssji.net>
     [not found]           ` <1096768161.21297.129.camel@thomas>
2004-10-03 20:18             ` Nicolas Pouillon
2004-10-04  8:05               ` Thomas Gleixner
2004-10-04 16:38                 ` Nicolas Pouillon
2004-10-04 17:59                   ` Thomas Gleixner
2004-10-04 20:47                     ` Nicolas Pouillon
2004-10-04 21:04                       ` Thomas Gleixner
2004-11-21 23:58 Patch, Andreas Fenkart
2004-11-22  6:37 ` Patch, Jaroslav Kysela
2007-04-28 21:47 PATCH: Mark Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yttpuoj8gfs.fsf@serpe.mitica \
    --to=quintela@fi.udc.es \
    --cc=linus@orzan.fi.udc.es \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.