summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/linux_sysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
index 873dc02..78584d6 100644
--- a/src/linux_sysfs.c
+++ b/src/linux_sysfs.c
@@ -558,6 +558,9 @@ pci_device_linux_sysfs_map_range(struct pci_device *dev,
strerror(errno), errno);
/* err = errno;*/
}
+ /* KLUDGE ALERT -- rewrite the PTEs to turn off the CD and WT bits */
+ mprotect (map->memory, map->size, PROT_NONE);
+ mprotect (map->memory, map->size, PROT_READ|PROT_WRITE);
}
#endif