All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wen Yang <wen.yang@linux.dev>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: Nam Cao <namcao@linutronix.de>,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] rv/reactors: export rv_register_reactor() and rv_unregister_reactor()
Date: Mon, 10 Aug 2026 01:21:07 +0800	[thread overview]
Message-ID: <a2671b5d-7c74-4fbd-bd38-ef3896516436@linux.dev> (raw)
In-Reply-To: <6943bc6d81388939512772b602f0c920ef0e5b01.camel@redhat.com>



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


> 
>>
>> Signed-off-by: Wen Yang <wen.yang@linux.dev>
>> ---
>>   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.
> 

  reply	other threads:[~2026-08-09 17:21 UTC|newest]

Thread overview: 12+ 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-09 17:19     ` Wen Yang
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
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-09 17:21     ` Wen Yang [this message]
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
2026-08-09 17:42     ` Wen Yang

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=a2671b5d-7c74-4fbd-bd38-ef3896516436@linux.dev \
    --to=wen.yang@linux.dev \
    --cc=gmonaco@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=namcao@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.