diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2011-08-29 16:08:51 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2011-08-29 16:08:51 +0900 |
| commit | b9a3acf46afdafc601947136f63e9dd228cd86e8 (patch) | |
| tree | 2b206b6d3c51f673c94fbcdf03df2a699e7110d2 /include/linux/cred.h | |
| parent | 9f0fa7991af382bfa8c9575d2457a0b6ad03ac4c (diff) | |
| parent | 21d41f2b312231536cf981c960c83cc4493c0293 (diff) | |
Merge branch 'sh/stable-updates' into sh-latest
Diffstat (limited to 'include/linux/cred.h')
| -rw-r--r-- | include/linux/cred.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/cred.h b/include/linux/cred.h index 98f46efbe2d2..40308969ed00 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 @@ -307,7 +307,7 @@ static inline void put_cred(const struct cred *_cred) #define get_current_user() \ ({ \ struct user_struct *__u; \ - struct cred *__cred; \ + const struct cred *__cred; \ __cred = current_cred(); \ __u = get_uid(__cred->user); \ __u; \ @@ -322,7 +322,7 @@ static inline void put_cred(const struct cred *_cred) #define get_current_groups() \ ({ \ struct group_info *__groups; \ - struct cred *__cred; \ + const struct cred *__cred; \ __cred = current_cred(); \ __groups = get_group_info(__cred->group_info); \ __groups; \ |
