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:
parent
3daee1d6c3
commit
c0959978ec
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user