mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Merge tag 'dma-mapping-6.8-2024-01-18' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fixes from Christoph Hellwig: - fix kerneldoc warnings (Randy Dunlap) - better bounds checking in swiotlb (ZhangPeng) * tag 'dma-mapping-6.8-2024-01-18' of git://git.infradead.org/users/hch/dma-mapping: dma-debug: fix kernel-doc warnings swiotlb: check alloc_size before the allocation of a new memory pool
This commit is contained in:
@@ -1136,6 +1136,9 @@ static int swiotlb_find_slots(struct device *dev, phys_addr_t orig_addr,
|
||||
int cpu, i;
|
||||
int index;
|
||||
|
||||
if (alloc_size > IO_TLB_SEGSIZE * IO_TLB_SIZE)
|
||||
return -1;
|
||||
|
||||
cpu = raw_smp_processor_id();
|
||||
for (i = 0; i < default_nareas; ++i) {
|
||||
index = swiotlb_search_area(dev, cpu, i, orig_addr, alloc_size,
|
||||
|
||||
Reference in New Issue
Block a user