Debian Bug report logs - #185094
Patch consider_lmm_collect: Test always true

Package: gnumach; Maintainer for gnumach is GNU Hurd Maintainers <debian-hurd@lists.debian.org>; Source for gnumach is src:gnumach.

Reported by: John Tobey <jtobey@john-edwin-tobey.org>

Date: Mon, 17 Mar 2003 00:33:05 UTC

Severity: normal

Tags: upstream

Done: Guillem Jover <guillem@debian.org>

Bug is archived. No further changes may be made.

Forwarded to https://savannah.gnu.org/patch/index.php?func=detailitem&item_id=4738

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, GNU Hurd Maintainers <bug-hurd@gnu.org>, gnumach@packages.qa.debian.org:
Bug#185094; Package gnumach. Full text and rfc822 format available.

Acknowledgement sent to John Tobey <jtobey@john-edwin-tobey.org>:
New Bug report received and forwarded. Copy sent to GNU Hurd Maintainers <bug-hurd@gnu.org>, gnumach@packages.qa.debian.org. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: John Tobey <jtobey@john-edwin-tobey.org>
To: submit@bugs.debian.org
Subject: Patch consider_lmm_collect: Test always true
Date: Sun, 16 Mar 2003 19:39:16 -0500
Package: gnumach
Version: CVS 20030316

In gnumach/oskit/osenv_mem.c, consider_lmm_collect() looks as if it
can stop short of transfering the optimal number of pages from VM to
LMM due to an oversight.  The variable `i' is decremented to 0 before
it is compared to `batch'.  Since `batch' is always positive there,
the test will always come out true, and the loop will exit too early.

The following patch should fix this.

-John

Index: oskit/osenv_mem.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/oskit/osenv_mem.c,v
retrieving revision 1.2
diff -u -r1.2 osenv_mem.c
--- oskit/osenv_mem.c	27 May 2002 23:01:57 -0000	1.2
+++ oskit/osenv_mem.c	16 Mar 2003 23:47:40 -0000
@@ -402,10 +402,11 @@
 	  unsigned int batch = need > PAGE_BATCH ? PAGE_BATCH : need;
 	  void *pages[PAGE_BATCH];
 	  unsigned int i;
+	  vm_page_t mem = VM_PAGE_NULL;
 
 	  for (i = 0; i < batch; ++i)
 	    {
-	      vm_page_t mem = vm_page_grab (FALSE);
+	      mem = vm_page_grab (FALSE);
 	      if (mem == VM_PAGE_NULL)
 		break;
 	      pages[i] = (void *) mem->phys_addr;
@@ -424,7 +425,7 @@
 	  simple_unlock (&phys_lmm_lock);
 	  splx (s);
 
-	  if (i < batch)
+	  if (mem == VM_PAGE_NULL)
 	    break;
 	  need -= batch;
 	}



Tags added: upstream Request was from Samuel Thibault <samuel.thibault@ens-lyon.org> to control@bugs.debian.org. Full text and rfc822 format available.

Noted your statement that Bug has been forwarded to https://savannah.gnu.org/patch/index.php?func=detailitem&item_id=4738. Request was from Samuel Thibault <samuel.thibault@ens-lyon.org> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Guillem Jover <guillem@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to John Tobey <jtobey@john-edwin-tobey.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #14 received at 185094-done@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: 185094-done@bugs.debian.org
Subject: #185094: Patch consider_lmm_collect: Test always true
Date: Thu, 12 Jan 2006 00:58:58 +0200
Hi,

This problem affects oskit-mach, which is not packaged for Debian
currently. And as the patch has been forwarded upstream now, I'm
closing this bug.

thanks,
guillem



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 18 Jun 2007 23:30:23 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 24 08:09:07 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.