Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752047AbdHLA0M (ORCPT ); Fri, 11 Aug 2017 20:26:12 -0400 Received: from mail-ua0-f181.google.com ([209.85.217.181]:35229 "EHLO mail-ua0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751948AbdHLA0A (ORCPT ); Fri, 11 Aug 2017 20:26:00 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Wei Wang Date: Fri, 11 Aug 2017 17:25:58 -0700 Message-ID: Subject: Re: unregister_netdevice: waiting for eth0 to become free. Usage count = 1 To: David Ahern Cc: Cong Wang , John Stultz , Martin KaFai Lau , lkml , Network Development , Linux USB List , "David S. Miller" , Felipe Balbi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1065 Lines: 22 On Fri, Aug 11, 2017 at 5:19 PM, David Ahern wrote: > On 8/11/17 6:10 PM, Wei Wang wrote: >> I think we have a potential fix for this issue. >> Martin and I found that when addrconf_dst_alloc() creates a rt6, it is >> possible that rt6->dst.dev points to loopback device while >> rt6->rt6i_idev->dev points to a real device. >> When the real device goes down, the current fib6 clean up code only >> checks for rt6->dst.dev and assumes rt6->rt6i_idev->dev is the same. >> That leaves unreleased refcnt on the real device if rt6->dst.dev >> points to loopback dev. > > Yes, host routes and anycast routes. > > I have a patch to fix that but it is held up on a few VRF test cases > failing. Hopefully I can get that figured out next week. These unrelated > routes against the loopback device have been a source of a number of > problems (e.g. take down 'lo' and all of IPv6 networking stops for that > namespace). Thanks David. By "a patch to fix that" do you mean after your patch, for every rt6, rt6->rt6i_idev will be the same as rt6->dst.dev?