Re: [Patch net] ip6mr: avoid double unregister of pim6reg device

Nikolay Aleksandrov
2017-04-21T19:34:28Z

On 21/04/17 22:27, Cong Wang wrote:
> If we unregister the pim6reg device via default_device_exit_batch(),
> we will receive a notification and ip6mr_device_event() will
> unregister it again. This causes a kernel BUG at net/core/dev.c:6813.
>
> Like commit 7dc00c82cbb0 ("ipv4: Fix ipmr unregister device oops")
> we should avoid double-unregister in netdevice notifier.
>
> Reported-by: Andrey Konovalov <andreyknvl@google.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> ---
> net/ipv6/ip6mr.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>

Cong,
Please read the full thread, I've already provided a fix which is similar.
https://patchwork.ozlabs.org/patch/753531/

Thanks,
Nik