[PATCH] Fix for crash on reading /dev/mem in 64 bit.
Jayachandran C.
jchandra at freebsd.org
Wed Oct 12 15:42:19 UTC 2011
The crash happens because memrw() calls uiomove_fromphys() with a
vm_page that is allocated in stack. This page does not have the
md.pv_list initialized, and when uiomove_fromphys() calls
pmap_flush_pvcache(), it results in a kernel crash. The attached
patch fixes this bug.
Also looking at the code of uiomove_fromphys(), I'm not sure why we
need the wbinv and flush pvcache and then another wbinv - any ideas?
If there are no comments, I'm planning to check it in later this week.
JC.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-dev-mem.patch
Type: text/x-patch
Size: 342 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20111012/39f19b5e/mips-dev-mem.bin
More information about the freebsd-mips
mailing list