Skip to contentSkip to conversation

iommu-helper: segment boundary limit should be a power of 2

PATCH New FUJITA Tomonori 1 participant 1 message Feb 16, 2008 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu-helper: segment boundary limit should be a power of 2

The segment boundary limit should be a power of 2 so let's make it clear.

---
 lib/iommu-helper.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
lib/iommu-helper.c +2 -0
index 495575a..de0eced 100644
@@ -54,6 +54,8 @@ unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
 			       unsigned long align_mask)
 {
 	unsigned long index;
+
+	BUG_ON(!is_power_of_2(boundary_size));
 again:
 	index = find_next_zero_area(map, size, start, nr, align_mask);
 	if (index != -1) {
Signature · 1 line
1.5.3.7