summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-03-07 10:06:25 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-07 10:06:25 -0800
commit304362a8bce1a5b7f9491be5a0643cd14a52364d (patch)
treec1e54257a4e9cc5327cb4c84e566a8869af62b6e /include
parentf26db9649af36b8eb76850108113d4056f494537 (diff)
parent040757f738e13caaa9c5078bca79aa97e11dde88 (diff)
downloadlinux-304362a8bce1a5b7f9491be5a0643cd14a52364d.tar.bz2
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.h2
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];
};