From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kent Subject: Re: autofs stops working after a while with USE_MISC_DEVICE Date: Wed, 08 Jul 2009 09:04:51 +0800 Message-ID: <4A53F0B3.4020603@themaw.net> References: <4A4D8BC0.2010708@themaw.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autofs-bounces@linux.kernel.org Errors-To: autofs-bounces@linux.kernel.org To: Thomas Chan Cc: autofs mailing list , Wolfram Wagner Thomas Chan wrote: > >>> I may have spotted this problem. >>> Could you try this patch please. >>> >>> Ian >>> >>> autofs-5.0.4 - fix rpc fd leak >>> >>> From: Ian Kent >>> >>> Recent changes which introduced the ability to handle to cope with >>> IPv6 addresses causes a file descriptor leak in the RPC library. >>> --- >>> >>> lib/rpc_subs.c | 11 ----------- >>> 1 files changed, 0 insertions(+), 11 deletions(-) >>> >>> >>> diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c >>> index d034b29..cafc775 100644 >>> --- a/lib/rpc_subs.c >>> +++ b/lib/rpc_subs.c >>> @@ -253,17 +253,6 @@ static CLIENT *rpc_do_create_client(struct >>> sockaddr *addr, struct conn_info *inf >>> return NULL; >>> } >>> >>> - if (!info->client) { >>> - *fd = open_sock(addr->sa_family, type, proto); >>> - if (*fd < 0) >>> - return NULL; >>> - >>> - if (bind(*fd, laddr, slen) < 0) { >>> - close(*fd); >>> - return NULL; >>> - } >>> - } >>> - >>> switch (info->proto->p_proto) { >>> case IPPROTO_UDP: >>> if (!info->client) { >>> >> >> This looks good so far. After restarting autofs, I don't see the >> increasing open files any more. >> >> Thomas >> > > After a few days of running with this patch, everything looks to still > be functioning as expected. Thanks for the speedy fix! Thanks, I get onto committing the fix. Ian