git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PM: Wait for console in resume
[safe/jmp/linux-2.6]
/
kernel
/
futex_compat.c
diff --git
a/kernel/futex_compat.c
b/kernel/futex_compat.c
index
ff90f04
..
d607a5b
100644
(file)
--- a/
kernel/futex_compat.c
+++ b/
kernel/futex_compat.c
@@
-30,7
+30,7
@@
fetch_robust_entry(compat_uptr_t *uentry, struct robust_list __user **entry,
return 0;
}
return 0;
}
-static void __user *futex_uaddr(struct robust_list *entry,
+static void __user *futex_uaddr(struct robust_list
__user
*entry,
compat_long_t futex_offset)
{
compat_uptr_t base = ptr_to_compat(entry);
compat_long_t futex_offset)
{
compat_uptr_t base = ptr_to_compat(entry);
@@
-135,6
+135,7
@@
compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
{
struct compat_robust_list_head __user *head;
unsigned long ret;
{
struct compat_robust_list_head __user *head;
unsigned long ret;
+ const struct cred *cred = current_cred(), *pcred;
if (!futex_cmpxchg_enabled)
return -ENOSYS;
if (!futex_cmpxchg_enabled)
return -ENOSYS;
@@
-150,8
+151,10
@@
compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
if (!p)
goto err_unlock;
ret = -EPERM;
if (!p)
goto err_unlock;
ret = -EPERM;
- if ((current->euid != p->euid) && (current->euid != p->uid) &&
- !capable(CAP_SYS_PTRACE))
+ pcred = __task_cred(p);
+ if (cred->euid != pcred->euid &&
+ cred->euid != pcred->uid &&
+ !capable(CAP_SYS_PTRACE))
goto err_unlock;
head = p->compat_robust_list;
read_unlock(&tasklist_lock);
goto err_unlock;
head = p->compat_robust_list;
read_unlock(&tasklist_lock);