Messages in this thread |  | | | Date | Fri, 22 Jun 2012 01:50:56 +0400 | | From | Alexey Kuznetsov <> | | Subject | Re: Bug in net/ipv6/ip6_fib.c:fib6_dump_table() |
| |
On Thu, Jun 21, 2012 at 10:27:49PM +0200, Eric Dumazet wrote: > Looking at this code, it lacks proper synchronization > between tree updaters and tree walkers. > > fib6_walker_lock rwlock is not enough to prevent races.
Hmm. As author of this weird code, I must say I honestly believed it was correct. At least I tried. :-)
What's about 2bec5a336.., it does not look reasonable. The idea was that when you change tree, you fixup sleeping walkers, moving their location in tree to correct point. So, walkers must not have any stale pointers at any times (except when you under table write lock) and no skips/counts are required. I remember how damn difficult was it to make this right (well, sorry, if it is not yet :-)), so that understand that if some update is forgotten or done incorrectly, it is not so easy to find, but it is definitely worth of efforts.
Alexey
|  |