All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Thomas Chan <tchan@ilm.com>
Cc: autofs mailing list <autofs@linux.kernel.org>,
	Wolfram Wagner <ww@mpi-inf.mpg.de>
Subject: Re: autofs stops working after a while with USE_MISC_DEVICE
Date: Wed, 08 Jul 2009 09:04:51 +0800	[thread overview]
Message-ID: <4A53F0B3.4020603@themaw.net> (raw)
In-Reply-To: <alpine.LRH.2.00.0907071055370.8827@talon.lucasfilm.com>

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 <raven@themaw.net>
>>>
>>> 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

      reply	other threads:[~2009-07-08  1:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 18:55 autofs stops working after a while with USE_MISC_DEVICE Thomas Chan
2009-07-03  4:40 ` Ian Kent
2009-07-03  5:35   ` Thomas Chan
2009-07-03  8:41     ` Ian Kent
2009-07-03 17:15       ` Thomas Chan
2009-07-04  3:49     ` Ian Kent
2009-07-04  4:32       ` Thomas Chan
2009-07-07 18:20         ` Thomas Chan
2009-07-08  1:04           ` Ian Kent [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A53F0B3.4020603@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@linux.kernel.org \
    --cc=tchan@ilm.com \
    --cc=ww@mpi-inf.mpg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.