Use pmap_kextract(x) rather than pmap_extract(kernel_pmap, x). The

former knows about all the special mappings, like PBVM. The kernel
text and data are in the PBVM.
This commit is contained in:
Marcel Moolenaar 2012-08-18 23:28:34 +00:00
parent 45f83785e1
commit 5435dbc676
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239379

View file

@ -129,7 +129,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
addr = trunc_page(v);
eaddr = round_page(v + c);
for (; addr < eaddr; addr += PAGE_SIZE) {
if (pmap_extract(kernel_pmap, addr) == 0)
if (pmap_kextract(addr) == 0)
return (EFAULT);
}
if (!kernacc((caddr_t)v, c, (uio->uio_rw == UIO_READ)