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

David Howells
2020-01-28T15:00:24Z

Amol Grover <frextrite@gmail.com> wrote:

> task_struct.cred and task_struct.real_cred are annotated by __rcu,
> hence use rcu_access_pointer to access them.
>
> Fixes the following sparse errors:
> kernel/cred.c:144:9: error: incompatible types in comparison expression
> (different address spaces):
> kernel/cred.c:144:9: struct cred *
> kernel/cred.c:144:9: struct cred const [noderef] <asn:4> *
> kernel/cred.c:145:9: error: incompatible types in comparison expression
> (different address spaces):
> kernel/cred.c:145:9: struct cred *
> kernel/cred.c:145:9: struct cred const [noderef] <asn:4> *
>
> Signed-off-by: Amol Grover <frextrite@gmail.com>

Reviewed-by: David Howells <dhowells@redhat.com>