From: Andrey Konovalov <andreyk...@google.com> Date: Thu, 4 May 2017 14:28:37 +0200
> On Thu, May 4, 2017 at 7:07 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote: >> Andrey reported a crash on init_net.ipv6.ip6_null_entry->rt6i_idev >> since it is always NULL. >> >> This is clearly wrong, we have code to initialize it to loopback_dev, >> unfortunately the order is still not correct. >> >> loopback_dev is registered very early during boot, we lose a chance >> to re-initialize it in notifier. addrconf_init() is called after >> ip6_route_init(), which means we have no chance to correct it. >> >> Fix it by moving this initialization explicitly after >> ipv6_add_dev(init_net.loopback_dev) in addrconf_init(). >> >> Reported-by: Andrey Konovalov <andreyk...@google.com> >> Signed-off-by: Cong Wang <xiyou.wangc...@gmail.com> > > Hi Cong, > > This fixes the bug triggered by my reproducer. > > Thanks! > > Tested-by: Andrey Konovalov <andreyk...@google.com> Applied and queued up for -stable, thanks.