Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309733
b: refs/heads/master
c: 43e13cc
h: refs/heads/master
i:
  309731: ea4126c
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jun 1, 2012
1 parent cf59cfe commit a36ad70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b3c98cd663750c33434572ff76ba306505eba5a
refs/heads/master: 43e13cc107cf6cd3c15fbe1cef849435c2223d50
10 changes: 3 additions & 7 deletions trunk/include/linux/cred.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,17 +277,13 @@ static inline void put_cred(const struct cred *_cred)
* @task: The task to query
*
* Access the objective credentials of a task. The caller must hold the RCU
* readlock or the task must be dead and unable to change its own credentials.
* readlock.
*
* The result of this function should not be passed directly to get_cred();
* rather get_task_cred() should be used instead.
*/
#define __task_cred(task) \
({ \
const struct task_struct *__t = (task); \
rcu_dereference_check(__t->real_cred, \
task_is_dead(__t)); \
})
#define __task_cred(task) \
rcu_dereference((task)->real_cred)

/**
* get_current_cred - Get the current task's subjective credentials
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
unsigned long state;
int retval, status, traced;
pid_t pid = task_pid_vnr(p);
uid_t uid = from_kuid_munged(current_user_ns(), __task_cred(p)->uid);
uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p));
struct siginfo __user *infop;

if (!likely(wo->wo_flags & WEXITED))
Expand Down

0 comments on commit a36ad70

Please sign in to comment.