Thread (32 messages) flat view 32 messages, 7 authors, 2021-10-12

Re: [RFC][PATCH] rcu: Use typeof(p) instead of typeof(*p) *

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-10-05 19:47:07
Also in: lkml, netfilter-devel, rcu

On Tue, Oct 5, 2021 at 12:40 PM Steven Rostedt [off-list ref] wrote:
I may try it, because exposing the structure I want to hide, is pulling out
a lot of other crap with it :-p
One option is just "don't do rcu_access of a pointer that you're not
supposed to touch in a file that isn't supposed to touch it".

IOW, why are you doing that

     pid_list = rcu_dereference_sched(tr->function_pids);

in a place that isn't supposed to look at the pid_list in the first place?

Yeah, yeah, I see how you just pass it to trace_ignore_this_task() as
an argument, but maybe the real fix is to just pass that trace_array
pointer instead?

IOW, if you want to keep that structure private, maybe you really just
shouldn't have non-private users of it randomly doing RCU lookups of
it?

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