[Linux-kernel-mentees] [PATCH] cred: Use RCU primitives to access RCU pointers

David Howells dhowells at redhat.com
Tue Jan 28 15:00:10 UTC 2020


Amol Grover <frextrite at 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 at gmail.com>

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



More information about the Linux-kernel-mentees mailing list