Thread (2 messages) 2 messages, 2 authors, 2023-09-12

Re: suspicious RCU usage warning on tracing/urgent

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2023-09-12 02:42:13
Also in: lkml

On Mon, 11 Sep 2023 12:00:53 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
But it seems correctly taking srcu_read_lock().

    452 
    453         ei = ti->private;
    454         idx = srcu_read_lock(&eventfs_srcu);
    455         list_for_each_entry_rcu(ef, &ei->e_top_files, list) {
    456                 create_dentry(ef, dentry, false);
    457         }
    458         srcu_read_unlock(&eventfs_srcu, idx);
    459         return dcache_dir_open(inode, file);
    460 }
    461 

This may false-positive warning, or srcu_read_lock() is not enough for
list_for_each_entry_rcu(). In latter case, maybe we need to use a
mutex instead of srcu for update the ef.
Oops, that should be list_for_each_entry_srcu().

Thanks!
BTW, the ftracetest itself passed without any problem.
Thanks for testing as well!

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help