diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-04-10 21:59:56 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-04-10 21:59:56 +0200 |
commit | 87ad46e601340394cd75c1c79b19ca906f82c543 (patch) | |
tree | 33fc81013077804e4bdea9465de66144ca1d025b /kernel/pid.c | |
parent | Merge tag 'pwm/for-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
parent | proc: Use a dedicated lock in struct pid (diff) | |
download | linux-87ad46e601340394cd75c1c79b19ca906f82c543.tar.xz linux-87ad46e601340394cd75c1c79b19ca906f82c543.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull proc fix from Eric Biederman:
"A brown paper bag slipped through my proc changes, and syzcaller
caught it when the code ended up in your tree.
I have opted to fix it the simplest cleanest way I know how, so there
is no reasonable chance for the bug to repeat"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
proc: Use a dedicated lock in struct pid
Diffstat (limited to 'kernel/pid.c')
-rw-r--r-- | kernel/pid.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/pid.c b/kernel/pid.c index bc21c0fb26d8..c835b844aca7 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -256,6 +256,7 @@ struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid, get_pid_ns(ns); refcount_set(&pid->count, 1); + spin_lock_init(&pid->lock); for (type = 0; type < PIDTYPE_MAX; ++type) INIT_HLIST_HEAD(&pid->tasks[type]); |