On 6/13/17 3:42 PM, Cong Wang wrote:
> On Tue, Jun 13, 2017 at 1:16 PM, Ben Greear <gree...@candelatech.com> wrote:
>> On 06/09/2017 02:25 PM, Eric Dumazet wrote:
>>>
>>> On Fri, 2017-06-09 at 07:27 -0600, David Ahern wrote:
>>>>
>>>> On 6/8/17 11:55 PM, Cong Wang wrote:
>>>>> Apparently fn->parent is NULL here for some reason, but
>>>>> I don't know if that is expected or not. If a simple NULL check
>>>>> is not enough here, we have to trace why it is NULL.
>>>>
>>>>
>>>> From my understanding, parent should not be null hence the attempts to
>>>> fix access to table nodes under a lock. ie., figuring out why it is null
>>>> here.
>>
>>
>> If someone has more suggestions, I'll be happy to test.
> 
> Can you enable RT6_TRACE() by changing RT6_DEBUG
> from 2 to 3? We may collect some useful log with it.
> 
> diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
> index d4bf2c6..1941595 100644
> --- a/net/ipv6/ip6_fib.c
> +++ b/net/ipv6/ip6_fib.c
> @@ -37,7 +37,7 @@
>  #include <net/ip6_fib.h>
>  #include <net/ip6_route.h>
> 
> -#define RT6_DEBUG 2
> +#define RT6_DEBUG 3
> 
>  #if RT6_DEBUG >= 3
>  #define RT6_TRACE(x...) pr_debug(x)
> 

Let's try a targeted debug patch. See attached
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index deea901746c8..367f1284f05b 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1396,6 +1396,8 @@ static struct fib6_node *fib6_repair_tree(struct net *net,
                                                RT6_TRACE("W %p adjusted by 
delnode 2, s=%d\n", w, w->state);
                                                w->state = w->state >= FWS_C ? 
FWS_U : FWS_INIT;
                                        }
+                                       if (w->state == FWS_U)
+                                               pr_warn("fib6_repair_tree: W %p 
adjusted by delnode 2, state FWS_U\n", w, w->state);
                                }
                        }
                }
@@ -1447,8 +1449,10 @@ static void fib6_del_route(struct fib6_node *fn, struct 
rt6_info **rtp,
                if (w->state == FWS_C && w->leaf == rt) {
                        RT6_TRACE("walker %p adjusted by delroute\n", w);
                        w->leaf = rt->dst.rt6_next;
-                       if (!w->leaf)
+                       if (!w->leaf) {
+                               pr_warn("fib6_del_route: walker %p adjusted by 
delroute - state FWS_U\n", w);
                                w->state = FWS_U;
+                       }
                }
        }
        read_unlock(&net->ipv6.fib6_walker_lock);
@@ -1591,6 +1595,7 @@ static int fib6_walk_continue(struct fib6_walker *w)
                                continue;
                        }
 skip:
+                       pr_warn("fib6_walk_continue: set state to FWS_U\n");
                        w->state = FWS_U;
                case FWS_U:
                        if (fn == w->root)

Reply via email to