diff options
author | Sergey Vlasov <vsu@altlinux.ru> | 2006-03-25 18:36:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-07 09:44:29 -0700 |
commit | 097189fd249125617092ae9b57e36b7d87a5c1bf (patch) | |
tree | 0b892229a5a69fca6af7a0688f2669fb0a077ab1 /kernel/exec_domain.c | |
parent | 6f9d7d9822f3448cd5794306ccd6bde9a6c5dd8e (diff) |
[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().
This patch was already included in Linus' tree.
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: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/exec_domain.c')
-rw-r--r-- | kernel/exec_domain.c | 1 |
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; } |