diff mbox series

[v2,13/13] srcu: Improve srcu_read_lock_lite() kernel-doc comment

Message ID 20241011173931.2050422-13-paulmck@kernel.org (mailing list archive)
State Superseded
Commit c4dd18a590155213f9fe89f8d5bbd50154f28791
Headers show
Series SRCU-lite changes for v6.13 | expand

Commit Message

Paul E. McKenney Oct. 11, 2024, 5:39 p.m. UTC
Where RCU is watching is where it is OK to invoke rcu_read_lock().

Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 include/linux/srcu.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andrii Nakryiko Oct. 11, 2024, 5:57 p.m. UTC | #1
On Fri, Oct 11, 2024 at 10:39 AM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> Where RCU is watching is where it is OK to invoke rcu_read_lock().
>
> Reported-by: Andrii Nakryiko <andrii@kernel.org>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> ---
>  include/linux/srcu.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>

Acked-by: Andrii Nakryiko <andrii@kernel.org>

> diff --git a/include/linux/srcu.h b/include/linux/srcu.h
> index 4ba96e2cfa405..bab1dae3f69e6 100644
> --- a/include/linux/srcu.h
> +++ b/include/linux/srcu.h
> @@ -270,7 +270,8 @@ static inline int srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp)
>   * synchronize_rcu_expedited(), IPIs and all.
>   *
>   * Note that srcu_read_lock_lite() can be invoked only from those contexts
> - * where RCU is watching.  Otherwise, lockdep will complain.
> + * where RCU is watching, that is, from contexts where it would be legal
> + * to invoke rcu_read_lock().  Otherwise, lockdep will complain.
>   */
>  static inline int srcu_read_lock_lite(struct srcu_struct *ssp) __acquires(ssp)
>  {
> --
> 2.40.1
>
Paul E. McKenney Oct. 15, 2024, 3:59 p.m. UTC | #2
On Fri, Oct 11, 2024 at 10:57:13AM -0700, Andrii Nakryiko wrote:
> On Fri, Oct 11, 2024 at 10:39 AM Paul E. McKenney <paulmck@kernel.org> wrote:
> >
> > Where RCU is watching is where it is OK to invoke rcu_read_lock().
> >
> > Reported-by: Andrii Nakryiko <andrii@kernel.org>
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > ---
> >  include/linux/srcu.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> 
> Acked-by: Andrii Nakryiko <andrii@kernel.org>

Applied, thank you!

							Thanx, Paul

> > diff --git a/include/linux/srcu.h b/include/linux/srcu.h
> > index 4ba96e2cfa405..bab1dae3f69e6 100644
> > --- a/include/linux/srcu.h
> > +++ b/include/linux/srcu.h
> > @@ -270,7 +270,8 @@ static inline int srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp)
> >   * synchronize_rcu_expedited(), IPIs and all.
> >   *
> >   * Note that srcu_read_lock_lite() can be invoked only from those contexts
> > - * where RCU is watching.  Otherwise, lockdep will complain.
> > + * where RCU is watching, that is, from contexts where it would be legal
> > + * to invoke rcu_read_lock().  Otherwise, lockdep will complain.
> >   */
> >  static inline int srcu_read_lock_lite(struct srcu_struct *ssp) __acquires(ssp)
> >  {
> > --
> > 2.40.1
> >
diff mbox series

Patch

diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index 4ba96e2cfa405..bab1dae3f69e6 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -270,7 +270,8 @@  static inline int srcu_read_lock(struct srcu_struct *ssp) __acquires(ssp)
  * synchronize_rcu_expedited(), IPIs and all.
  *
  * Note that srcu_read_lock_lite() can be invoked only from those contexts
- * where RCU is watching.  Otherwise, lockdep will complain.
+ * where RCU is watching, that is, from contexts where it would be legal
+ * to invoke rcu_read_lock().  Otherwise, lockdep will complain.
  */
 static inline int srcu_read_lock_lite(struct srcu_struct *ssp) __acquires(ssp)
 {