mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
rv: Export rv_register_reactor() and rv_unregister_reactor()
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 link time(modpost).
Commit 3d3800b4f7 ("rv: Remove reactor's reference counter") noted
that module-based reactors, if supported, should be pinned with
try_module_get()/module_put() to prevent unloading under an active
monitor. This patch does not add that support. The only in-tree module
consumer, the tristate KUnit reactor test module, registers and
unregisters its reactor within a controlled test lifecycle.
The actual pinning is left to a follow-up series that adds support for
loadable-module reactors.
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Wen Yang <wen.yang@linux.dev>
Link: https://lore.kernel.org/r/94b7ec120a92b9368541ac050601e66be8fe653a.1789412799.git.wen.yang@linux.dev
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
This commit is contained in:
parent
cd34b37a7d
commit
89a6f81029
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user