diff mbox series

kmsan: export kmsan_handle_urb

Message ID 20221215162710.3802378-1-arnd@kernel.org (mailing list archive)
State New
Headers show
Series kmsan: export kmsan_handle_urb | expand

Commit Message

Arnd Bergmann Dec. 15, 2022, 4:26 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 mm/kmsan/hooks.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Alexander Potapenko Dec. 15, 2022, 4:38 p.m. UTC | #1
On Thu, Dec 15, 2022 at 5:27 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Alexander Potapenko <glider@google.com>

> ---
>  mm/kmsan/hooks.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/mm/kmsan/hooks.c b/mm/kmsan/hooks.c
> index 35f6b6e6a908..3807502766a3 100644
> --- a/mm/kmsan/hooks.c
> +++ b/mm/kmsan/hooks.c
> @@ -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
>
diff mbox series

Patch

diff --git a/mm/kmsan/hooks.c b/mm/kmsan/hooks.c
index 35f6b6e6a908..3807502766a3 100644
--- a/mm/kmsan/hooks.c
+++ b/mm/kmsan/hooks.c
@@ -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)