From: Ben Greear <greearb@candelatech.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Reuben Farrelly <reuben-lkml@reub.net>,
akpm@osdl.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, acme@conectiva.com.br,
davem@davemloft.net
Subject: Re: [3/3] [NEIGH] Fix timer leak in neigh_changeaddr
Date: Sun, 23 Oct 2005 11:00:17 -0700 [thread overview]
Message-ID: <435BCFB1.4010109@candelatech.com> (raw)
In-Reply-To: <20051023073331.GC17626@gondor.apana.org.au>
Herbert Xu wrote:
> [NEIGH] Fix timer leak in neigh_changeaddr
>
> neigh_changeaddr attempts to delete neighbour timers without setting
> nud_state. This doesn't work because the timer may have already fired
> when we acquire the write lock in neigh_changeaddr. The result is that
> the timer may keep firing for quite a while until the entry reaches
> NEIGH_FAILED.
>
> It should be setting the nud_state straight away so that if the timer
> has already fired it can simply exit once we relinquish the lock.
>
> In fact, this whole function is simply duplicating the logic in
> neigh_ifdown which in turn is already doing the right thing when
> it comes to deleting timers and setting nud_state.
>
> So all we have to do is take that code out and put it into a common
> function and make both neigh_changeaddr and neigh_ifdown call it.
Thanks for all who reproduced and fixed this...I'm glad to know I wasn't
insane when I first tried to fix it and then couldn't reproduce
the problem anymore! :)
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2005-10-23 18:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.h4unqgj.l34e31@ifi.uio.no>
2005-10-17 6:19 ` 2.6.14-rc4-mm1 Reuben Farrelly
2005-10-23 7:30 ` [0/3] Fix timer bugs in neighbour cache Herbert Xu
2005-10-23 7:31 ` [1/3] [NEIGH] Print stack trace in neigh_add_timer Herbert Xu
2005-10-23 7:32 ` [2/3] [NEIGH] Fix add_timer race " Herbert Xu
2005-10-23 7:33 ` [3/3] [NEIGH] Fix timer leak in neigh_changeaddr Herbert Xu
2005-10-23 18:00 ` Ben Greear [this message]
2005-10-23 16:16 ` [0/3] Fix timer bugs in neighbour cache Arnaldo Carvalho de Melo
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=435BCFB1.4010109@candelatech.com \
--to=greearb@candelatech.com \
--cc=acme@conectiva.com.br \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=reuben-lkml@reub.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).