diff options
author | jchandra <jchandra@FreeBSD.org> | 2011-10-17 05:42:53 +0000 |
---|---|---|
committer | jchandra <jchandra@FreeBSD.org> | 2011-10-17 05:42:53 +0000 |
commit | ab686ad475f8fc9c70cece2888819a6d09cb5883 (patch) | |
tree | 52d8255430f108030bed5887294c6890ee48b154 | |
parent | 45d831bde4cbb7f06a2e5ee89c637eac5786afcb (diff) | |
download | FreeBSD-src-ab686ad475f8fc9c70cece2888819a6d09cb5883.zip FreeBSD-src-ab686ad475f8fc9c70cece2888819a6d09cb5883.tar.gz |
Fix for crash on MIPS /dev/mem read.
Reading /dev/mem in 64 bit kernel crashes. This is because the page
used to call uiomove_fromphys() from memrw() does not have md.pv_list
initialized correctly.
The fix is to call pmap_page_init() on the page to initialize it.
-rw-r--r-- | sys/mips/mips/mem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/mips/mips/mem.c b/sys/mips/mips/mem.c index 7529a9e..d40c424 100644 --- a/sys/mips/mips/mem.c +++ b/sys/mips/mips/mem.c @@ -87,6 +87,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags) GIANT_REQUIRED; + pmap_page_init(&m); while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; if (iov->iov_len == 0) { |