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
505 505
506not_found:506not_found:
507 spin_unlock_irqrestore(&io_tlb_lock, flags);507 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);
509 return SWIOTLB_MAP_ERROR;510 return SWIOTLB_MAP_ERROR;
510found:511found:
511 spin_unlock_irqrestore(&io_tlb_lock, flags);512 spin_unlock_irqrestore(&io_tlb_lock, flags);