From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from s3.sipsolutions.net ([5.9.151.49]:50250 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754917AbcISKCW (ORCPT ); Mon, 19 Sep 2016 06:02:22 -0400 Message-ID: <1474279330.4469.28.camel@sipsolutions.net> (sfid-20160919_120228_517669_28A2A922) Subject: Re: [v2 PATCH 0/2] rhashtable: rhashtable with duplicate objects From: Johannes Berg To: Herbert Xu Cc: "David S. Miller" , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Thomas Graf , tom@herbertland.com, Ben Greear Date: Mon, 19 Sep 2016 12:02:10 +0200 In-Reply-To: <1474278896.4469.26.camel@sipsolutions.net> (sfid-20160919_115508_261438_39410159) References: <20160804071846.GA773@gondor.apana.org.au> <20160804074546.GA996@gondor.apana.org.au> <1470377813.2977.14.camel@sipsolutions.net> <20160805104858.GA9297@gondor.apana.org.au> <1470394233.2977.37.camel@sipsolutions.net> <20160918135030.GA7062@gondor.apana.org.au> <20160919084056.GA11875@gondor.apana.org.au> <1474276530.4469.16.camel@sipsolutions.net> <20160919091721.GA12235@gondor.apana.org.au> <1474277244.4469.21.camel@sipsolutions.net> <20160919093434.GA12378@gondor.apana.org.au> (sfid-20160919_113440_719977_971CE718) <1474278634.4469.25.camel@sipsolutions.net> (sfid-20160919_115045_089605_A254E125) <1474278896.4469.26.camel@sipsolutions.net> (sfid-20160919_115508_261438_39410159) Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Mon, 2016-09-19 at 11:54 +0200, Johannes Berg wrote: > > > > The stack trace is useless, but my other annotation showed that the > > table's nelems *underflowed* to -1, so now the worker will continue > > to try to grow it forever. > > > > And this *was* actually a case of duplication, afaict, since it was > multiple virtual interfaces on the same device all connecting to the > same AP. It seems that __rhashtable_remove_fast_one() should return 0 even in the case of err==1 for the "skip all the maintenance due to list deletion"? --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h @@ -1009,7 +1009,7 @@ static inline int __rhashtable_remove_fast_one(                 err = 0;         }   -       return err; +       return err < 0 ? err : 0;  } But that in itself doesn't help. johannes