Page MenuHomeFreeBSD

D56971.diff
No OneTemporary

D56971.diff

diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -544,6 +544,9 @@
#if defined(__amd64__)
void *va;
+ if (!PHYS_IN_DMAP(start) || !PHYS_IN_DMAP(start + size))
+ return (-EINVAL);
+
va = PHYS_TO_DMAP(start);
return (-pmap_change_attr(va, size, VM_MEMATTR_WRITE_COMBINING));
#else
@@ -557,8 +560,10 @@
#if defined(__amd64__)
void *va;
- va = PHYS_TO_DMAP(start);
+ if (!PHYS_IN_DMAP(start) || !PHYS_IN_DMAP(start + size))
+ return;
+ va = PHYS_TO_DMAP(start);
pmap_change_attr(va, size, VM_MEMATTR_WRITE_BACK);
#endif
}

File Metadata

Mime Type
text/plain
Expires
Tue, May 19, 1:20 PM (7 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33056178
Default Alt Text
D56971.diff (706 B)

Event Timeline