| From stable-bounces@linux.kernel.org Sat Mar 25 09:36:52 2006 |
| Date: Sat, 25 Mar 2006 18:36:37 +0100 |
| From: Adrian Bunk <bunk@stusta.de> |
| To: stable@kernel.org |
| Message-ID: <20060325173637.GH4053@stusta.de> |
| Content-Disposition: inline |
| Cc: Sergey Vlasov <vsu@altlinux.ru>, Christoph Hellwig <hch@lst.de> |
| Subject: Fix module refcount leak in __set_personality() |
| |
| From: Sergey Vlasov <vsu@altlinux.ru> |
| |
| 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> |
| |
| --- |
| kernel/exec_domain.c | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| --- linux-2.6.16.1.orig/kernel/exec_domain.c |
| +++ linux-2.6.16.1/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; |
| } |
| |