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.
This commit is contained in:
Jayachandran C. 2011-10-17 05:42:53 +00:00
parent 3daee1d6c3
commit c0959978ec

View File

@ -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) {