diff options
| -rw-r--r-- | kernel/futex.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 7c68225e3967..81dbe773ce4c 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
| @@ -814,6 +814,11 @@ lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, | |||
| 814 | if (!p) | 814 | if (!p) |
| 815 | return -ESRCH; | 815 | return -ESRCH; |
| 816 | 816 | ||
| 817 | if (!p->mm) { | ||
| 818 | put_task_struct(p); | ||
| 819 | return -EPERM; | ||
| 820 | } | ||
| 821 | |||
| 817 | /* | 822 | /* |
| 818 | * We need to look at the task state flags to figure out, | 823 | * We need to look at the task state flags to figure out, |
| 819 | * whether the task is exiting. To protect against the do_exit | 824 | * whether the task is exiting. To protect against the do_exit |
