[Top][All Lists]

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

vfree bug in gnumach

From: Stefan Siegl
Subject: vfree bug in gnumach
Date: Fri, 12 May 2006 18:35:57 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)


I hope I'm not confused too much right now, but concerning the `vfree'
function (from linux/dev/glue/kmem.c), the function shouldn't actually
panic if the memory has been allocated before (and vmalloc_list_lookup
returned non-null), but if it hasn't. Therefore the `if(p)' should be
negated I think. Am I wrong?

Index: kmem.c
RCS file: /sources/hurd/gnumach/linux/dev/glue/Attic/kmem.c,v
retrieving revision 1.1
diff -b -p -U4 -r1.1 kmem.c
--- kmem.c      26 Apr 1999 05:45:35 -0000      1.1
+++ kmem.c      12 May 2006 16:26:08 -0000
@@ -549,9 +549,9 @@ vfree (void *addr)
   struct vmalloc_struct *p;
   p = vmalloc_list_lookup ((vm_offset_t) addr);
-  if (p)
+  if (!p)
     panic ("vmalloc_list_lookup failure");
   kmem_free (kernel_map, addr, p->size);
   vmalloc_list_remove (p);

Do not worry about your difficulties in mathematics;
I can assure you that mine are still greater.
                                  -- Albert Einstein

reply via email to

[Prev in Thread] Current Thread [Next in Thread]