From: Gabriele Monaco <gmonaco@redhat.com>
To: wen.yang@linux.dev
Cc: Nam Cao <namcao@linutronix.de>,
linux-trace-kernel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/4] rv/reactors: propagate rv_register_reactor() error from reactor init
Date: Mon, 03 Aug 2026 08:35:53 +0200 [thread overview]
Message-ID: <489b764f5add05c08a468dca02b6c0f0d8197a90.camel@redhat.com> (raw)
In-Reply-To: <76b672af7c3eed78582ae90fcbf4736a76783df5.1785695669.git.wen.yang@linux.dev>
On Mon, 2026-08-03 at 02:43 +0800, wen.yang@linux.dev wrote:
> From: Wen Yang <wen.yang@linux.dev>
>
> Both register_react_printk() and register_react_panic() ignore the
> return value of rv_register_reactor() and always return 0. If the
> registration fails (e.g. a duplicate reactor name), the init functions
> silently report success even though the reactor was not registered.
>
> Propagate the error from rv_register_reactor() so a failed registration
> is reported instead of being silently ignored.
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
>
> Suggested-by: Gabriele Monaco <gmonaco@redhat.com>
> Signed-off-by: Wen Yang <wen.yang@linux.dev>
> ---
> kernel/trace/rv/reactor_panic.c | 3 +--
> kernel/trace/rv/reactor_printk.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/trace/rv/reactor_panic.c b/kernel/trace/rv/reactor_panic.c
> index 76537b8a4343..db7116ceafff 100644
> --- a/kernel/trace/rv/reactor_panic.c
> +++ b/kernel/trace/rv/reactor_panic.c
> @@ -26,8 +26,7 @@ static struct rv_reactor rv_panic = {
>
> static int __init register_react_panic(void)
> {
> - rv_register_reactor(&rv_panic);
> - return 0;
> + return rv_register_reactor(&rv_panic);
> }
>
> static void __exit unregister_react_panic(void)
> diff --git a/kernel/trace/rv/reactor_printk.c
> b/kernel/trace/rv/reactor_printk.c
> index 48c934e315b3..002a10f6aa7b 100644
> --- a/kernel/trace/rv/reactor_printk.c
> +++ b/kernel/trace/rv/reactor_printk.c
> @@ -25,8 +25,7 @@ static struct rv_reactor rv_printk = {
>
> static int __init register_react_printk(void)
> {
> - rv_register_reactor(&rv_printk);
> - return 0;
> + return rv_register_reactor(&rv_printk);
> }
>
> static void __exit unregister_react_printk(void)
next prev parent reply other threads:[~2026-08-03 6:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 18:43 [PATCH v2 0/4] rv/reactors: fix lockdep warning and add KUnit tests wen.yang
2026-08-02 18:43 ` [PATCH v2 1/4] rv/reactors: use context-sensitive lockdep wait type in rv_react() wen.yang
2026-08-03 15:39 ` Gabriele Monaco
2026-08-02 18:43 ` [PATCH v2 2/4] rv/reactors: propagate rv_register_reactor() error from reactor init wen.yang
2026-08-03 6:35 ` Gabriele Monaco [this message]
2026-08-02 18:43 ` [PATCH v2 3/4] rv/reactors: export rv_register_reactor() and rv_unregister_reactor() wen.yang
2026-08-03 6:32 ` Gabriele Monaco
2026-08-02 18:43 ` [PATCH v2 4/4] rv/reactors: add KUnit tests for reactor registration and dispatch wen.yang
2026-08-03 12:49 ` Gabriele Monaco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=489b764f5add05c08a468dca02b6c0f0d8197a90.camel@redhat.com \
--to=gmonaco@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=namcao@linutronix.de \
--cc=wen.yang@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox