From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: rtnl_mutex deadlock? Date: Fri, 07 Aug 2015 01:58:15 +0200 Message-ID: <55C3F497.6020003@iogearbox.net> References: <20150805074330.GA2084@nanopsycho.orion> <55C25CFB.2060103@iogearbox.net> <20150806003026.GA12785@gondor.apana.org.au> <55C3743F.1010900@iogearbox.net> <20150806234117.GA22588@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Linus Torvalds , Jiri Pirko , Cong Wang , David Miller , Nicolas Dichtel , Thomas Graf , Scott Feldman , Network Development To: Herbert Xu Return-path: Received: from www62.your-server.de ([213.133.104.62]:39990 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753000AbbHFX6W (ORCPT ); Thu, 6 Aug 2015 19:58:22 -0400 In-Reply-To: <20150806234117.GA22588@gondor.apana.org.au> Sender: netdev-owner@vger.kernel.org List-ID: On 08/07/2015 01:41 AM, Herbert Xu wrote: > On Thu, Aug 06, 2015 at 04:50:39PM +0200, Daniel Borkmann wrote: >> >> Then, in __rhashtable_insert_fast(), I could trigger an -EBUSY when I'm >> really unlucky and exceed the ht->elasticity limit of 16. I would then >> end up in rhashtable_insert_rehash() to find out there's already one >> ongoing and thus, I'm getting -EBUSY via __netlink_insert(). > > Right, so the only way you can trigger this is if you hit a chain > longer than 16 and the number of entries in the table is less than > 75% the size of the table, as well as there being an existing resize > or rehash operation. > > This should be pretty much impossible. > > But if we had a WARN_ON_ONCE there then we'll know for sure. Looks like we had a WARN_ON() in rhashtable_insert_rehash() before, but was removed in a87b9ebf1709 ("rhashtable: Do not schedule more than one rehash if we can't grow further"). Do you want to re-add a WARN_ON_ONCE()? Thanks, Daniel