diff --git a/include/linux/cred.h b/include/linux/cred.h index 98f46efbe2d21a422802d7fd7bbee06d0b993116..8e2fd44eb16059abc64cdda42cbd18eb25808c93 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -269,7 +269,7 @@ static inline void put_cred(const struct cred *_cred) * since nobody else can modify it. */ #define current_cred() \ - (*(__force struct cred **)¤t->cred) + rcu_dereference_protected(current->cred, 1) /** * __task_cred - Access a task's objective credentials