From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [Patch net] ipv6: avoid unregistering inet6_dev for loopback Date: Thu, 22 Jun 2017 13:22:32 -0400 (EDT) Message-ID: <20170622.132232.558497530705704974.davem@davemloft.net> References: <1498080898-17338-1-git-send-email-xiyou.wangcong@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, andreyknvl@google.com, dlezcano@fr.ibm.com, dsahern@gmail.com To: xiyou.wangcong@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:38576 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751224AbdFVRWf (ORCPT ); Thu, 22 Jun 2017 13:22:35 -0400 In-Reply-To: <1498080898-17338-1-git-send-email-xiyou.wangcong@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Cong Wang Date: Wed, 21 Jun 2017 14:34:58 -0700 > The per netns loopback_dev->ip6_ptr is unregistered and set to > NULL when its mtu is set to smaller than IPV6_MIN_MTU, this > leads to that we could set rt->rt6i_idev NULL after a > rt6_uncached_list_flush_dev() and then crash after another > call. > > In this case we should just bring its inet6_dev down, rather > than unregistering it, at least prior to commit 176c39af29bc > ("netns: fix addrconf_ifdown kernel panic") we always > override the case for loopback. > > Thanks a lot to Andrey for finding a reliable reproducer. > > Fixes: 176c39af29bc ("netns: fix addrconf_ifdown kernel panic") > Reported-by: Andrey Konovalov > Cc: Andrey Konovalov > Cc: Daniel Lezcano > Cc: David Ahern > Signed-off-by: Cong Wang Applied and queued up for -stable.