From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761027AbYDQBbN (ORCPT ); Wed, 16 Apr 2008 21:31:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761204AbYDQBKI (ORCPT ); Wed, 16 Apr 2008 21:10:08 -0400 Received: from sous-sol.org ([216.99.217.87]:59035 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760874AbYDQBKH (ORCPT ); Wed, 16 Apr 2008 21:10:07 -0400 Message-Id: <20080417010354.950049854@sous-sol.org> References: <20080417010122.148289106@sous-sol.org> User-Agent: quilt/0.46-1 Date: Wed, 16 Apr 2008 18:02:13 -0700 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Trond Myklebust , Chuck Lever Subject: SUNRPC: Fix a memory leak in rpc_create() Content-Disposition: inline; filename=sunrpc-fix-a-memory-leak-in-rpc_create.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org -stable review patch. If anyone has any objections, please let us know. --------------------- From: Chuck Lever upstream commit: ed13c27e546667fb0967ae30f5070cd7f6455f90 Commit 510deb0d was supposed to move the xprt_create_transport() call in rpc_create(), but neglected to remove the old call site. This resulted in a transport leak after every rpc_create() call. This leak is present in 2.6.24 and 2.6.25. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust Signed-off-by: Chris Wright --- net/sunrpc/clnt.c | 4 ---- 1 file changed, 4 deletions(-) --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -249,10 +249,6 @@ struct rpc_clnt *rpc_create(struct rpc_c }; char servername[20]; - xprt = xprt_create_transport(&xprtargs); - if (IS_ERR(xprt)) - return (struct rpc_clnt *)xprt; - /* * If the caller chooses not to specify a hostname, whip * up a string representation of the passed-in address. --