svn commit: r284207 - head/sys/vm

Alan Cox alc at FreeBSD.org
Wed Jun 10 05:17:15 UTC 2015


Author: alc
Date: Wed Jun 10 05:17:14 2015
New Revision: 284207
URL: https://svnweb.freebsd.org/changeset/base/284207

Log:
  Correct a type error in kmem_unback().  Previously, kmem_unback() did not
  correctly handle deallocation requests of two or more gigabytes in size.
  Eventually, this would lead to a panic elsewhere in the kernel, such as
  "vm_radix_insert: key <vm_pindex_t> is already present".
  
  Reported by:	Ilias Marinos
  MFC after:	1 week

Modified:
  head/sys/vm/vm_kern.c

Modified: head/sys/vm/vm_kern.c
==============================================================================
--- head/sys/vm/vm_kern.c	Wed Jun 10 04:57:09 2015	(r284206)
+++ head/sys/vm/vm_kern.c	Wed Jun 10 05:17:14 2015	(r284207)
@@ -391,8 +391,7 @@ void
 kmem_unback(vm_object_t object, vm_offset_t addr, vm_size_t size)
 {
 	vm_page_t m;
-	vm_offset_t offset;
-	int i;
+	vm_offset_t i, offset;
 
 	KASSERT(object == kmem_object || object == kernel_object,
 	    ("kmem_unback: only supports kernel objects."));


More information about the svn-src-all mailing list