diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-23 17:18:00 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-23 17:18:00 +1000 |
commit | 49636bb12892786e4a7b207b37ca7b0c5ca1cae0 (patch) | |
tree | b7a29d9344d0e6ee41d5e28f5a7b6fda5da05fa3 /net/rxrpc/krxiod.c | |
parent | 6fb9974f49f7a6032118c5b6caa6e08e7097913e (diff) |
[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.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'net/rxrpc/krxiod.c')
0 files changed, 0 insertions, 0 deletions