Skip to content

Commit 16d1ba7

Browse files
committed
Merge tag 'dma-mapping-6.18-2025-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux
Pull dma-mapping fixes from Marek Szyprowski: "Two small fixes for the recently performed code refactoring (Shigeru Yoshida) and missing handling of direction parameter in DMA debug code (Petr Tesarik)" * tag 'dma-mapping-6.18-2025-10-07' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux: dma-mapping: fix direction in dma_alloc direction traces kmsan: fix kmsan_handle_dma() to avoid false positives
2 parents fdb8d00 + 16abbab commit 16d1ba7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/trace/events/dma.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ DECLARE_EVENT_CLASS(dma_alloc_class,
133133
__entry->dma_addr = dma_addr;
134134
__entry->size = size;
135135
__entry->flags = flags;
136+
__entry->dir = dir;
136137
__entry->attrs = attrs;
137138
),
138139

mm/kmsan/hooks.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,12 @@ static void kmsan_handle_dma_page(const void *addr, size_t size,
339339
void kmsan_handle_dma(phys_addr_t phys, size_t size,
340340
enum dma_data_direction dir)
341341
{
342-
struct page *page = phys_to_page(phys);
343342
u64 page_offset, to_go;
344343
void *addr;
345344

346345
if (PhysHighMem(phys))
347346
return;
348-
addr = page_to_virt(page);
347+
addr = phys_to_virt(phys);
349348
/*
350349
* The kernel may occasionally give us adjacent DMA pages not belonging
351350
* to the same allocation. Process them separately to avoid triggering

0 commit comments

Comments
 (0)