svn commit: r342802 - stable/11/sys/compat/linuxkpi/common/src

Konstantin Belousov kib at FreeBSD.org
Sun Jan 6 00:54:09 UTC 2019


Author: kib
Date: Sun Jan  6 00:54:08 2019
New Revision: 342802
URL: https://svnweb.freebsd.org/changeset/base/342802

Log:
  MFC r342625, r342631:
  Use IDX_TO_OFF().

Modified:
  stable/11/sys/compat/linuxkpi/common/src/linux_compat.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c	Sun Jan  6 00:52:53 2019	(r342801)
+++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c	Sun Jan  6 00:54:08 2019	(r342802)
@@ -538,7 +538,7 @@ linux_cdev_pager_populate(vm_object_t vm_obj, vm_pinde
 		struct vm_fault vmf;
 
 		/* fill out VM fault structure */
-		vmf.virtual_address = (void *)((uintptr_t)pidx << PAGE_SHIFT);
+		vmf.virtual_address = (void *)(uintptr_t)IDX_TO_OFF(pidx);
 		vmf.flags = (fault_type & VM_PROT_WRITE) ? FAULT_FLAG_WRITE : 0;
 		vmf.pgoff = 0;
 		vmf.page = NULL;


More information about the svn-src-all mailing list