Patch "tracing/osnoise: Use built-in RCU list checking" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tracing/osnoise: Use built-in RCU list checking

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tracing-osnoise-use-built-in-rcu-list-checking.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a4ef8cfece510b7254754cb888d9d356dc873642
Author: Chuang Wang <nashuiliang@xxxxxxxxx>
Date:   Tue Dec 27 10:30:36 2022 +0800

    tracing/osnoise: Use built-in RCU list checking
    
    [ Upstream commit 685b64e4d6da4be8b4595654a57db663b3d1dfc2 ]
    
    list_for_each_entry_rcu() has built-in RCU and lock checking.
    
    Pass cond argument to list_for_each_entry_rcu() to silence false lockdep
    warning when CONFIG_PROVE_RCU_LIST is enabled.
    
    Execute as follow:
    
     [tracing]# echo osnoise > current_tracer
     [tracing]# echo 1 > tracing_on
     [tracing]# echo 0 > tracing_on
    
    The trace_types_lock is held when osnoise_tracer_stop() or
    timerlat_tracer_stop() are called in the non-RCU read side section.
    So, pass lockdep_is_held(&trace_types_lock) to silence false lockdep
    warning.
    
    Link: https://lkml.kernel.org/r/20221227023036.784337-1-nashuiliang@xxxxxxxxx
    
    Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
    Fixes: dae181349f1e ("tracing/osnoise: Support a list of trace_array *tr")
    Acked-by: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
    Signed-off-by: Chuang Wang <nashuiliang@xxxxxxxxx>
    Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index 4300c5dc4e5d..1c07efcb3d46 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -125,9 +125,8 @@ static void osnoise_unregister_instance(struct trace_array *tr)
 	 * register/unregister serialization is provided by trace's
 	 * trace_types_lock.
 	 */
-	lockdep_assert_held(&trace_types_lock);
-
-	list_for_each_entry_rcu(inst, &osnoise_instances, list) {
+	list_for_each_entry_rcu(inst, &osnoise_instances, list,
+				lockdep_is_held(&trace_types_lock)) {
 		if (inst->tr == tr) {
 			list_del_rcu(&inst->list);
 			found = 1;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux