vmap: Handle unaligned vaddrs on vunmap_vmem()
authorBarret Rhoden <brho@cs.berkeley.edu>
Sat, 26 Nov 2016 22:03:20 +0000 (17:03 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 29 Nov 2016 16:27:40 +0000 (11:27 -0500)
commit7c08375f48f965e4337eb0fbb0a49a9c360a964d
treef241221e41c9e0e2c179d003600eba3d288146c3
parent224ac4ac8d9a8bd220609dd1363c91d01e3deba6
vmap: Handle unaligned vaddrs on vunmap_vmem()

vmap_pmem() allows the user to give us an unaligned paddr and it maps
enough pages to cover the requested region.  However, for the unmap, we
incorrectly thought we were given the vaddr of the overall mapping - not
the vaddr we returned to the caller (which was vaddr + PGOFF(paddr).

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/mm.c