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
This commit is contained in:
Alan Cox 2015-06-10 05:17:14 +00:00
parent 52e4a08c45
commit 5cd7a4f76c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284207

View File

@ -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."));