Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750835AbWBOS7Z (ORCPT ); Wed, 15 Feb 2006 13:59:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750891AbWBOS7Z (ORCPT ); Wed, 15 Feb 2006 13:59:25 -0500 Received: from master.altlinux.org ([62.118.250.235]:36869 "EHLO master.altlinux.org") by vger.kernel.org with ESMTP id S1750835AbWBOS7Y (ORCPT ); Wed, 15 Feb 2006 13:59:24 -0500 Date: Wed, 15 Feb 2006 21:58:55 +0300 From: Sergey Vlasov To: Christoph Hellwig Cc: linux-abi-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] Fix module refcount leak in __set_personality() Message-ID: <20060215185855.GE8670@procyon.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 843 Lines: 25 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 --- diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c index 867d6db..c01cead 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; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/