]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 294366:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 23 Jan 2016 17:08:17 +0000 (17:08 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 23 Jan 2016 17:08:17 +0000 (17:08 +0000)
commit83c069058a6d533065e80ca4d313888975cb6cb4
tree04764b343ccb6fa61389a749e43beb57fb1c1230
parent7e317d374a685b05c6a437da646a29e223c0491a
MFC 294366:
Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.

If a driver's Linux mmap callback passed vm_page_prot through unchanged,
then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx
value 0 is to the mapping.  On x86, VM_MEMATTR_DEFAULT is the PAT value
for write-back (WB) which is 6, while 0 maps to the PAT value for
uncacheable (UC).  Thus, any mmap request that did not explicitly set
page_prot was tried to map memory as UC triggering the warning in
sg_pager_getpages().

Sponsored by: Chelsio Communications

git-svn-id: svn://svn.freebsd.org/base/stable/10@294636 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/ofed/include/linux/linux_compat.c