Skip to contentSkip to conversation

kmsan: export kmsan_handle_urb

PATCH Applied Arnd Bergmann 2 participants 2 messages Dec 15, 2022

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

PATCH 1/1 kmsan: export kmsan_handle_urb

From: Arnd Bergmann <[email protected]>

USB support can be in a loadable module, and this causes a link failure with KMSAN:

ERROR: modpost: "kmsan_handle_urb" [drivers/usb/core/usbcore.ko] undefined!

Export the symbol so it can be used by this module.

Fixes 553a80188a5d ("kmsan: handle memory sent to/from USB")
---
 mm/kmsan/hooks.c | 1 +
 1 file changed, 1 insertion(+)
mm/kmsan/hooks.c +1 -0
index 35f6b6e6a908..3807502766a3 100644
@@ -260,6 +260,7 @@ void kmsan_handle_urb(const struct urb *urb, bool is_out)
 					       urb->transfer_buffer_length,
 					       /*checked*/ false);
 }
+EXPORT_SYMBOL_GPL(kmsan_handle_urb);
 
 static void kmsan_handle_dma_page(const void *addr, size_t size,
 				  enum dma_data_direction dir)
Signature · 1 line
2.35.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

USB support can be in a loadable module, and this causes a link failure with KMSAN:

Quoted 6 lines

ERROR: modpost: "kmsan_handle_urb" [drivers/usb/core/usbcore.ko] undefined!

Export the symbol so it can be used by this module.

Fixes 553a80188a5d ("kmsan: handle memory sent to/from USB")
Quoted 19 lines
---
 mm/kmsan/hooks.c | 1 +
 1 file changed, 1 insertion(+)
mm/kmsan/hooks.c +1 -1
index 35f6b6e6a908..3807502766a3 100644
@@ -260,6 +260,7 @@ void kmsan_handle_urb(const struct urb *urb, bool is_out)
                                               urb->transfer_buffer_length,
                                               /*checked*/ false);
 }
+EXPORT_SYMBOL_GPL(kmsan_handle_urb);
 
 static void kmsan_handle_dma_page(const void *addr, size_t size,
                                  enum dma_data_direction dir)
--

2.35.1

Signature · 10 lines
Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg