History

swiotlb: Don't DoS us with 'swiotlb buffer is full' (v2)

There is no need for that so lets use ratelimiting. Also add some extra information to be helpful.

Konrad Rzeszutek Wilk committed 12 years ago

Commit 0cb637b1 parent 91fec0f1 file · +2 −1Browse files

Unified · Split

lib/swiotlb.c+2−1
@@ -505,7 +505,8 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, · 504 unmodified lines
505505
506506 not_found:
507507 spin_unlock_irqrestore(&io_tlb_lock, flags);
508− dev_warn(hwdev, "swiotlb buffer is full\n");
508+ if (printk_ratelimit())
509+ dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", size);
509510 return SWIOTLB_MAP_ERROR;
510511 found:
511512 spin_unlock_irqrestore(&io_tlb_lock, flags);