Skip to contentSkip to conversation

kmsan: fix missed kmsan_handle_dma() signature conversion

PATCH Applied Leon Romanovsky 4 participants 4 messages Sep 17, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kmsan: fix missed kmsan_handle_dma() signature conversion

From: Leon Romanovsky <[email protected]>

kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was missed during conversion to physical addresses. Update that caller too and fix the following compilation error:

mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4

  371 |                 kmsan_handle_dma(sg_page(item), item->offset, item->length,
      |                 ~~~~~~~~~~~~~~~~
  372 |                                  dir);
      |                                  ^~~

mm/kmsan/hooks.c:362:19: note: 'kmsan_handle_dma' declared here
362 | EXPORT_SYMBOL_GPL(kmsan_handle_dma);

Fixes 6eb1e769b2c1 ("kmsan: convert kmsan_handle_dma to use physical addresses")
---
 mm/kmsan/hooks.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
mm/kmsan/hooks.c +1 -2
index fa9475e5ec4e9..90bee565b9bc2 100644
@@ -368,8 +368,7 @@ void kmsan_handle_dma_sg(struct scatterlist *sg, int nents,
 	int i;
 
 	for_each_sg(sg, item, nents, i)
-		kmsan_handle_dma(sg_page(item), item->offset, item->length,
-				 dir);
+		kmsan_handle_dma(sg_phys(item), item->length, dir);
 }
 
 /* Functions from kmsan-checks.h follow. */
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was missed during conversion to physical addresses. Update that caller too and fix the following compilation error:

mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4

  371 |                 kmsan_handle_dma(sg_page(item), item->offset, item->length,
      |                 ~~~~~~~~~~~~~~~~
  372 |                                  dir);
      |                                  ^~~

mm/kmsan/hooks.c:362:19: note: 'kmsan_handle_dma' declared here
362 | EXPORT_SYMBOL_GPL(kmsan_handle_dma);

Quoted 7 lines
Fixes 6eb1e769b2c1 ("kmsan: convert kmsan_handle_dma to use physical addresses")
---
 mm/kmsan/hooks.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Jason

maintainer Reviewed-by
#2 lore raw
Quoted 24 lines · Jason Gunthorpe
Quoted 14 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was missed during conversion to physical addresses. Update that caller too and fix the following compilation error:

mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4

  371 |                 kmsan_handle_dma(sg_page(item), item->offset, item->length,
      |                 ~~~~~~~~~~~~~~~~
  372 |                                  dir);
      |                                  ^~~

mm/kmsan/hooks.c:362:19: note: 'kmsan_handle_dma' declared here
362 | EXPORT_SYMBOL_GPL(kmsan_handle_dma);

Quoted 7 lines
Fixes 6eb1e769b2c1 ("kmsan: convert kmsan_handle_dma to use physical addresses")
---
 mm/kmsan/hooks.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Quoted 1 line
#3 lore raw
In reply to Leon Romanovsky
Quoted 11 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

kmsan_handle_dma_sg() has call to kmsan_handle_dma() function which was missed during conversion to physical addresses. Update that caller too and fix the following compilation error:

mm/kmsan/hooks.c:372:6: error: too many arguments to function call, expected 3, have 4

   371 |                 kmsan_handle_dma(sg_page(item), item->offset, item->length,
       |                 ~~~~~~~~~~~~~~~~
   372 |                                  dir);
       |                                  ^~~
Quoted 7 lines

mm/kmsan/hooks.c:362:19: note: 'kmsan_handle_dma' declared here
362 | EXPORT_SYMBOL_GPL(kmsan_handle_dma);

Fixes 6eb1e769b2c1 ("kmsan: convert kmsan_handle_dma to use physical addresses")

Applied to dma-mapping-for-next branch. Thanks!

Quoted 9 lines
---
  mm/kmsan/hooks.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
mm/kmsan/hooks.c +0 -0
index fa9475e5ec4e9..90bee565b9bc2 100644

mm/kmsan/hooks.c void kmsan_handle_dma_sg(struct scatterlist *sg, int nents, · line 374

Quoted 9 lines
mm/kmsan/hooks.c +1 -2
@@ -368,8 +368,7 @@ void kmsan_handle_dma_sg(struct scatterlist *sg, int nents,
  	int i;
 
  	for_each_sg(sg, item, nents, i)
-		kmsan_handle_dma(sg_page(item), item->offset, item->length,
-				 dir);
+		kmsan_handle_dma(sg_phys(item), item->length, dir);
  }
 
  /* Functions from kmsan-checks.h follow. */

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland