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
Showing the changes to kernel (2 of 2 files). Show all
Unified · Split
| @@ -62,7 +62,8 @@ enum map_err_types { · 61 unmodified lines | |||
| 62 | * @pfn: page frame of the start address | 62 | * @pfn: page frame of the start address |
| 63 | * @offset: offset of mapping relative to pfn | 63 | * @offset: offset of mapping relative to pfn |
| 64 | * @map_err_type: track whether dma_mapping_error() was checked | 64 | * @map_err_type: track whether dma_mapping_error() was checked |
| 65 | * @stacktrace: support backtraces when a violation is detected | 65 | * @stack_len: number of backtrace entries in @stack_entries |
| 66 | * @stack_entries: stack of backtrace history | ||
| 66 | */ | 67 | */ |
| 67 | struct dma_debug_entry { | 68 | struct dma_debug_entry { |
| 68 | struct list_head list; | 69 | struct list_head list; |
| @@ -1136,6 +1136,9 @@ static int swiotlb_find_slots(struct device *dev, phys_addr_t orig_addr, · 1135 unmodified lines | |||
| 1136 | int cpu, i; | 1136 | int cpu, i; |
| 1137 | int index; | 1137 | int index; |
| 1138 | 1138 | ||
| 1139 | if (alloc_size > IO_TLB_SEGSIZE * IO_TLB_SIZE) | ||
| 1140 | return -1; | ||
| 1141 | |||
| 1139 | cpu = raw_smp_processor_id(); | 1142 | cpu = raw_smp_processor_id(); |
| 1140 | for (i = 0; i < default_nareas; ++i) { | 1143 | for (i = 0; i < default_nareas; ++i) { |
| 1141 | index = swiotlb_search_area(dev, cpu, i, orig_addr, alloc_size, | 1144 | index = swiotlb_search_area(dev, cpu, i, orig_addr, alloc_size, |