Skip to content

Commit

Permalink
[PATCH] Fix module refcount leak in __set_personality()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sergey Vlasov authored and Linus Torvalds committed Mar 24, 2006
1 parent b5a7c4f commit 6a4d11c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/exec_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6a4d11c

Please sign in to comment.