svn commit: r226459 - head/sys/mips/mips

Jayachandran C. jchandra at FreeBSD.org
Mon Oct 17 05:42:53 UTC 2011


Author: jchandra
Date: Mon Oct 17 05:42:53 2011
New Revision: 226459
URL: http://svn.freebsd.org/changeset/base/226459

Log:
  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.

Modified:
  head/sys/mips/mips/mem.c

Modified: head/sys/mips/mips/mem.c
==============================================================================
--- head/sys/mips/mips/mem.c	Mon Oct 17 05:41:03 2011	(r226458)
+++ head/sys/mips/mips/mem.c	Mon Oct 17 05:42:53 2011	(r226459)
@@ -87,6 +87,7 @@ memrw(struct cdev *dev, struct uio *uio,
 
 	GIANT_REQUIRED;
 
+	pmap_page_init(&m);
 	while (uio->uio_resid > 0 && !error) {
 		iov = uio->uio_iov;
 		if (iov->iov_len == 0) {


More information about the svn-src-all mailing list