lkml.org 
[lkml]   [2005]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [3/3] [NEIGH] Fix timer leak in neigh_changeaddr
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-23 20:03    [W:0.048 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site