Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F116048105
D35414.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
930 B
Referenced Files
None
Subscribers
None
D35414.diff
View Options
diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c
--- a/sys/dev/iommu/iommu_gas.c
+++ b/sys/dev/iommu/iommu_gas.c
@@ -384,7 +384,12 @@
iommu_gas_match_insert(a);
return (0);
}
- if (entry->free_down < a->size + a->offset + IOMMU_PAGE_SIZE)
+
+ /*
+ * If the subtree doesn't have free space for the requested allocation
+ * plus two guard pages, give up.
+ */
+ if (entry->free_down < a->size + a->offset + 2 * IOMMU_PAGE_SIZE)
return (ENOMEM);
if (entry->first >= a->common->lowaddr)
return (ENOMEM);
@@ -408,7 +413,11 @@
{
struct iommu_map_entry *child;
- if (entry->free_down < a->size + a->offset + IOMMU_PAGE_SIZE)
+ /*
+ * If the subtree doesn't have free space for the requested allocation
+ * plus two guard pages, give up.
+ */
+ if (entry->free_down < a->size + a->offset + 2 * IOMMU_PAGE_SIZE)
return (ENOMEM);
if (entry->last < a->common->highaddr)
return (ENOMEM);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, May 3, 1:42 AM (13 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17916599
Default Alt Text
D35414.diff (930 B)
Attached To
Mode
D35414: iommu_gas: restrict tree search to promising paths
Attached
Detach File
Event Timeline
Log In to Comment