From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tommi Rantala Date: Wed, 31 Jan 2018 17:51:58 +0000 Subject: Re: sctp netns "unregister_netdevice: waiting for lo to become free. Usage count = 1" Message-Id: List-Id: References: <2a9c25b0-9ee7-baf6-f212-2c94b06941ea@nokia.com> <20180130155909.GA25399@hmswarspite.think-freely.org> <085a2abc-36e3-74fd-8c3a-9352bdd05cf8@nokia.com> <20180130210353.GB25399@hmswarspite.think-freely.org> <20180131123105.GB23692@hmswarspite.think-freely.org> In-Reply-To: <20180131123105.GB23692@hmswarspite.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Neil Horman Cc: Vlad Yasevich , linux-sctp@vger.kernel.org, "netdev@vger.kernel.org" , Marcelo Ricardo Leitner On 31.01.2018 14:31, Neil Horman wrote: > On Wed, Jan 31, 2018 at 11:42:24AM +0200, Tommi Rantala wrote: >> I think there's a problem in the dst refcounting in sctp_v4_get_dst() >> >> There's a dst_entry struct that has >0 refcnt after running the testcase, >> which makes it impossible to delete the loopback device, as that dst is >> never freed. >> >> I'll try to make a patch. >> > Are you looking at the second for loop there, which uses ip_route_output_key, > but discards the result if dst is already set? That does look a bit wonky, and > the same problem may exist in the ipv6 path. Let me know what the result is. Yes, that was it. Did you receive the email I sent with the patch? (I'm not seeing that message e.g. at spinics.net linux-sctp archive, so just wondering if that email got lost somehow...) I'll check the ipv6 case, did not try it yet. Tommi From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tommi Rantala Subject: Re: sctp netns "unregister_netdevice: waiting for lo to become free. Usage count = 1" Date: Wed, 31 Jan 2018 19:51:58 +0200 Message-ID: References: <2a9c25b0-9ee7-baf6-f212-2c94b06941ea@nokia.com> <20180130155909.GA25399@hmswarspite.think-freely.org> <085a2abc-36e3-74fd-8c3a-9352bdd05cf8@nokia.com> <20180130210353.GB25399@hmswarspite.think-freely.org> <20180131123105.GB23692@hmswarspite.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Vlad Yasevich , linux-sctp@vger.kernel.org, "netdev@vger.kernel.org" , Marcelo Ricardo Leitner To: Neil Horman Return-path: Received: from mail-ve1eur01on0119.outbound.protection.outlook.com ([104.47.1.119]:19680 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753259AbeAaRwF (ORCPT ); Wed, 31 Jan 2018 12:52:05 -0500 In-Reply-To: <20180131123105.GB23692@hmswarspite.think-freely.org> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 31.01.2018 14:31, Neil Horman wrote: > On Wed, Jan 31, 2018 at 11:42:24AM +0200, Tommi Rantala wrote: >> I think there's a problem in the dst refcounting in sctp_v4_get_dst() >> >> There's a dst_entry struct that has >0 refcnt after running the testcase, >> which makes it impossible to delete the loopback device, as that dst is >> never freed. >> >> I'll try to make a patch. >> > Are you looking at the second for loop there, which uses ip_route_output_key, > but discards the result if dst is already set? That does look a bit wonky, and > the same problem may exist in the ipv6 path. Let me know what the result is. Yes, that was it. Did you receive the email I sent with the patch? (I'm not seeing that message e.g. at spinics.net linux-sctp archive, so just wondering if that email got lost somehow...) I'll check the ipv6 case, did not try it yet. Tommi