projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
locking/futex: Check PF_KTHREAD rather than !p->mm to filter out kthreads
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
futex.c
diff --git
a/kernel/futex.c
b/kernel/futex.c
index 4eeb63de7e54e895506e468acbcd4b3bed4271c6..1f6d646eee4aa30dbef8ef77bd70dca3124e387c 100644
(file)
--- a/
kernel/futex.c
+++ b/
kernel/futex.c
@@
-900,7
+900,7
@@
static int attach_to_pi_owner(u32 uval, union futex_key *key,
if (!p)
return -ESRCH;
- if (
!p->mm
) {
+ if (
unlikely(p->flags & PF_KTHREAD)
) {
put_task_struct(p);
return -EPERM;
}