summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2012-06-11 20:44:56 -0400
committerDenys Dmytriyenko <denys@ti.com>2012-06-11 20:44:56 -0400
commit88867c1d96684925027a0ecc9e25c6ea70040cc6 (patch)
treee1ad8651aa7663850f6dc1108b278f56a2b92a91 /extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch
parenta1e2573369c6714956af561523ba274aa9c185f7 (diff)
downloadmeta-ti-split.tar.gz
extras: move things to extrassplit
Move non-essential, outdated, best-effort pieces, as well, as those requiring extra non-standard dependencies besides oe-core. Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch b/extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch
new file mode 100644
index 00000000..8ddca9c1
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/linus/0027-fix-freeing-user_struct-in-user-cache.patch
@@ -0,0 +1,34 @@
1From 2bffbb04acdf2e58726ba8192d468f2bda528fdf Mon Sep 17 00:00:00 2001
2From: Hillf Danton <dhillf@gmail.com>
3Date: Wed, 29 Dec 2010 21:55:28 +0800
4Subject: [PATCH 27/65] fix freeing user_struct in user cache
5
6When racing on adding into user cache, the new allocated from mm slab
7is freed without putting user namespace.
8
9Since the user namespace is already operated by getting, putting has
10to be issued.
11
12Signed-off-by: Hillf Danton <dhillf@gmail.com>
13Acked-by: Serge Hallyn <serge@hallyn.com>
14Cc: stable@kernel.org
15Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16---
17 kernel/user.c | 1 +
18 1 files changed, 1 insertions(+), 0 deletions(-)
19
20diff --git a/kernel/user.c b/kernel/user.c
21index 2c7d8d5..5c598ca 100644
22--- a/kernel/user.c
23+++ b/kernel/user.c
24@@ -158,6 +158,7 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid)
25 spin_lock_irq(&uidhash_lock);
26 up = uid_hash_find(uid, hashent);
27 if (up) {
28+ put_user_ns(ns);
29 key_put(new->uid_keyring);
30 key_put(new->session_keyring);
31 kmem_cache_free(uid_cachep, new);
32--
331.6.6.1
34