From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 4/6] rhashtable: allow a walk of the hash table without missing objects. Date: Tue, 27 Mar 2018 11:49:41 -0400 (EDT) Message-ID: <20180327.114941.997071660018188736.davem@davemloft.net> References: <152210688405.11435.13010923693146415942.stgit@noble> <152210718430.11435.5761213978298714527.stgit@noble> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: tgraf@suug.ch, herbert@gondor.apana.org.au, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: neilb@suse.com Return-path: In-Reply-To: <152210718430.11435.5761213978298714527.stgit@noble> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: NeilBrown Date: Tue, 27 Mar 2018 10:33:04 +1100 > In many cases where the walker needs to drop out of RCU protection, > it will take a reference to the object and this can prevent it from > being removed from the hash table. In those cases, the last-returned > object can still be used as a cursor. rhashtable cannot detect > these cases itself. Merely having an elevated reference count does not explicitly prevent the object from being removed from the hash table. This invariant might hold for the particular user of the rhashtable instance, but it is not always the case.