Re: [PATCH] cred: Use RCU primitives to access RCU pointers

From: David Howells
Date: Fri Jan 31 2020 - 12:50:03 EST


Jann Horn <jannh@xxxxxxxxxx> wrote:

> > task_struct.cred and task_struct.real_cred are annotated by __rcu,
>
> task_struct.cred doesn't actually have RCU semantics though, see
> commit d7852fbd0f0423937fa287a598bfde188bb68c22. For task_struct.cred,
> it would probably be more correct to remove the __rcu annotation?

You're right, I think, there shouldn't be any need for __rcu on
task_struct::cred since it shouldn't be accessed on any task except current.

I've a feeling that there was something at the time, proc perhaps, but I don't
remember.

David