diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-07 21:06:25 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-03-07 21:06:25 +0300 |
commit | 304362a8bce1a5b7f9491be5a0643cd14a52364d (patch) | |
tree | c1e54257a4e9cc5327cb4c84e566a8869af62b6e /include | |
parent | f26db9649af36b8eb76850108113d4056f494537 (diff) | |
parent | 040757f738e13caaa9c5078bca79aa97e11dde88 (diff) | |
download | linux-304362a8bce1a5b7f9491be5a0643cd14a52364d.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull namespace fix from Eric Biederman:
"This fixes a race between put_ucounts and get_ucounts that can cause a
use after free. The fix works by simplifying the code and so there is
not even a temptation to be clever and play spinlock vs atomic
reference games"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
ucount: Remove the atomicity from ucount->count
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/user_namespace.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index be765234c0a2..32354b4b4b2b 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -72,7 +72,7 @@ struct ucounts { struct hlist_node node; struct user_namespace *ns; kuid_t uid; - atomic_t count; + int count; atomic_t ucount[UCOUNT_COUNTS]; }; |