diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-07-01 02:49:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-07-01 03:31:25 -0400 |
commit | 0a54cec0c25cc49e3b68b14c205f1f6cff13f5e1 (patch) | |
tree | eb4e63ee9ae1fcaf9aa53a1668e55c09516052d9 /kernel/futex.c | |
parent | ec8c27e04f89a7575ca2c4facb99152e03d6a99c (diff) | |
parent | 980019d74e4b2428362b36a0506519d6d9460800 (diff) |
Merge branch 'linus' into core/rcu
Conflicts:
fs/fs-writeback.c
Merge reason: Resolve the conflict
Note, i picked the version from Linus's tree, which effectively reverts
the fs-writeback.c bits of:
b97181f: fs: remove all rcu head initializations, except on_stack initializations
As the upstream changes to this file changed this code heavily and the
first attempt to resolve the conflict resulted in a non-booting kernel.
It's safer to re-try this portion of the commit cleanly.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index e7a35f1039e7..6a3a5fa1526d 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -429,20 +429,11 @@ static void free_pi_state(struct futex_pi_state *pi_state) | |||
429 | static struct task_struct * futex_find_get_task(pid_t pid) | 429 | static struct task_struct * futex_find_get_task(pid_t pid) |
430 | { | 430 | { |
431 | struct task_struct *p; | 431 | struct task_struct *p; |
432 | const struct cred *cred = current_cred(), *pcred; | ||
433 | 432 | ||
434 | rcu_read_lock(); | 433 | rcu_read_lock(); |
435 | p = find_task_by_vpid(pid); | 434 | p = find_task_by_vpid(pid); |
436 | if (!p) { | 435 | if (p) |
437 | p = ERR_PTR(-ESRCH); | 436 | get_task_struct(p); |
438 | } else { | ||
439 | pcred = __task_cred(p); | ||
440 | if (cred->euid != pcred->euid && | ||
441 | cred->euid != pcred->uid) | ||
442 | p = ERR_PTR(-ESRCH); | ||
443 | else | ||
444 | get_task_struct(p); | ||
445 | } | ||
446 | 437 | ||
447 | rcu_read_unlock(); | 438 | rcu_read_unlock(); |
448 | 439 | ||
@@ -564,8 +555,8 @@ lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, | |||
564 | if (!pid) | 555 | if (!pid) |
565 | return -ESRCH; | 556 | return -ESRCH; |
566 | p = futex_find_get_task(pid); | 557 | p = futex_find_get_task(pid); |
567 | if (IS_ERR(p)) | 558 | if (!p) |
568 | return PTR_ERR(p); | 559 | return -ESRCH; |
569 | 560 | ||
570 | /* | 561 | /* |
571 | * We need to look at the task state flags to figure out, | 562 | * We need to look at the task state flags to figure out, |