Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] The documentation for reactor locking rules was added to the wrong file 
(`monitor_synthesis.rst` instead of `runtime-verification.rst`), causing an 
inconsistency between the commit message, source code comments, and the actual 
documentation.
--

commit 26073218a7c3b83225869704d414a262b5e15e47
Author: Wen Yang <[email protected]>

rv/reactors: use LD_WAIT_SPIN as the reactor lockdep wait type

This commit changes the lockdep wait type override in rv_react() from
LD_WAIT_FREE to LD_WAIT_SPIN to prevent spurious "Invalid wait context"
warnings. It also adds documentation explaining the reactor locking rules.

> diff --git a/Documentation/trace/rv/monitor_synthesis.rst 
> b/Documentation/trace/rv/monitor_synthesis.rst
> index 2c1b5a0ae1545..aab4b0342d5f5 100644
> --- a/Documentation/trace/rv/monitor_synthesis.rst
> +++ b/Documentation/trace/rv/monitor_synthesis.rst
> @@ -365,6 +365,26 @@ but higher overhead. The timer wheel 
> (``HA_TIMER_WHEEL``) is a good alternative
>  for monitors with several instances (e.g. per-task) that achieves lower
>  overhead with increased latency, yet without compromising precision.
>  
> +Reactors
> +--------
> +
> +A reactor is a callback triggered by a monitor when a violation is
> +detected. Reactors are registered via ``/sys/kernel/tracing/rv/reactors/``
> +and enabled per monitor.
> +
> +Reactor Locking Rules
> +++++++++++++++++++++

[ ... ]

> diff --git a/kernel/trace/rv/rv_reactors.c b/kernel/trace/rv/rv_reactors.c
> index 2f5fc8d18dea4..afc97d0971091 100644
> --- a/kernel/trace/rv/rv_reactors.c
> +++ b/kernel/trace/rv/rv_reactors.c
> @@ -465,7 +465,11 @@ int init_rv_reactors(struct dentry *root_dir)
>  
>  void rv_react(struct rv_monitor *monitor, const char *msg, ...)
>  {
> -     static DEFINE_WAIT_OVERRIDE_MAP(rv_react_map, LD_WAIT_FREE);
> +     /*
> +      * Use LD_WAIT_SPIN uniformly for deterministic lockdep checking.
> +      * See Documentation/trace/rv/runtime-verification.rst.
> +      */

[Severity: Low]
Is the documentation for reactor locking rules added to the wrong file?

The comment added here in rv_react() points to
Documentation/trace/rv/runtime-verification.rst for the explanation of the
LD_WAIT_SPIN override. However, the documentation was actually added to
Documentation/trace/rv/monitor_synthesis.rst.

Could the comment or the file location be updated so readers following the
code comment will look in the correct documentation file?

> +     static DEFINE_WAIT_OVERRIDE_MAP(rv_react_map, LD_WAIT_SPIN);
>       va_list args;

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to