Thread (12 messages) flat view 12 messages, 2 authors, 2026-08-09

Re: [PATCH v2 3/4] rv/reactors: export rv_register_reactor() and rv_unregister_reactor()

From: Wen Yang <hidden>
Date: 2026-08-09 17:21:31
Also in: lkml


On 8/3/26 14:32, Gabriele Monaco wrote:
On Mon, 2026-08-03 at 02:43 +0800, wen.yang@linux.dev wrote:
quoted
From: Wen Yang <redacted>

rv_react() is exported to modules, but the reactor registration helpers
are not.  Export them with EXPORT_SYMBOL_GPL() so reactor modules and
the tristate KUnit test module can register and unregister reactors
without hitting undefined symbol errors at load time.
Nit, but I believe you meant /link/ time (modpost). Linking phase would fail at
the end of the build and you wouldn't have anything (.ko) to load.

Anyway patch looks good:

Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
You are correct, thank you for the nit.  Missing EXPORT_SYMBOL_GPL() is 
caught by modpost at link time; no .ko is produced, so "load time" was 
wrong.  Fixed in v3:
   "Export them with EXPORT_SYMBOL_GPL() so reactor modules and
    the tristate KUnit test module can register and unregister reactors
    without hitting undefined symbol errors at link time(modpost)."

--
Best wishes,
Wen

quoted
Signed-off-by: Wen Yang <redacted>
---
  kernel/trace/rv/rv_reactors.c | 2 ++
  1 file changed, 2 insertions(+)
diff --git a/kernel/trace/rv/rv_reactors.c b/kernel/trace/rv/rv_reactors.c
index cd571b1649f5..228ed043bd73 100644
--- a/kernel/trace/rv/rv_reactors.c
+++ b/kernel/trace/rv/rv_reactors.c
@@ -314,6 +314,7 @@ int rv_register_reactor(struct rv_reactor *reactor)
  	guard(mutex)(&rv_interface_lock);
  	return __rv_register_reactor(reactor);
  }
+EXPORT_SYMBOL_GPL(rv_register_reactor);
  
  /**
   * rv_unregister_reactor - unregister a rv reactor.
@@ -327,6 +328,7 @@ int rv_unregister_reactor(struct rv_reactor *reactor)
  	list_del(&reactor->list);
  	return 0;
  }
+EXPORT_SYMBOL_GPL(rv_unregister_reactor);
  
  /*
   * reacting_on interface.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help