summaryrefslogtreecommitdiffstats
path: root/kernel/exec_domain.c
diff options
context:
space:
mode:
authorSergey Vlasov <vsu@altlinux.ru>2006-03-24 12:18:38 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 16:33:30 +0100
commit6a4d11c2abc57ed7ca42041e5f68ae4f7f640a81 (patch)
tree93a839de19cf3f49bbbb3668f31c8a002c2f7f7f /kernel/exec_domain.c
parent[PATCH] ext3: Properly report backup block present in a group (diff)
downloadlinux-6a4d11c2abc57ed7ca42041e5f68ae4f7f640a81.tar.xz
linux-6a4d11c2abc57ed7ca42041e5f68ae4f7f640a81.zip
[PATCH] Fix module refcount leak in __set_personality()
If the change of personality does not lead to change of exec domain, __set_personality() returned without releasing the module reference acquired by lookup_exec_domain(). Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/exec_domain.c')
-rw-r--r--kernel/exec_domain.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c
index 867d6dbeb574..c01cead2cfd6 100644
--- a/kernel/exec_domain.c
+++ b/kernel/exec_domain.c
@@ -140,6 +140,7 @@ __set_personality(u_long personality)
ep = lookup_exec_domain(personality);
if (ep == current_thread_info()->exec_domain) {
current->personality = personality;
+ module_put(ep->module);
return 0;
}