Skip to content

Commit a85894c

Browse files
committed
iommu/vt-d: Use WARN_ON_ONCE instead of BUG_ON in qi_flush_dev_iotlb()
A misaligned address is only worth a warning, and not stopping the while execution path with a BUG_ON(). Signed-off-by: Joerg Roedel <[email protected]>
1 parent 0dfc0c7 commit a85894c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/dmar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep,
13451345
struct qi_desc desc;
13461346

13471347
if (mask) {
1348-
BUG_ON(addr & ((1ULL << (VTD_PAGE_SHIFT + mask)) - 1));
1348+
WARN_ON_ONCE(addr & ((1ULL << (VTD_PAGE_SHIFT + mask)) - 1));
13491349
addr |= (1ULL << (VTD_PAGE_SHIFT + mask - 1)) - 1;
13501350
desc.high = QI_DEV_IOTLB_ADDR(addr) | QI_DEV_IOTLB_SIZE;
13511351
} else

0 commit comments

Comments
 (0)