From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Thu, 3 Feb 2011 18:02:51 +0100 References: <1296352379-1546-1-git-send-email-sven@narfation.org> In-Reply-To: <1296352379-1546-1-git-send-email-sven@narfation.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201102031802.52134.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] Reordered rcu refcounting Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking Hi, > I told Linus and Marek that the implementation of some datastructures using > reference counting and RCUs must be redesigned. The problem is that > call_rcu should only be used when the reference count is zero because > multiple call_rcu cannot be initiated at the same time. The next problem > is that we may try to access an element with the refcount 0 when we try to > traverse a rcu protected list. This problem cannot be solved by kref - > thus we have to use atomic_t again to not increase the reference count > when it was already zero. I reviewed the posted patches, filled in the missing parts and fixed some bugs along the way. Feel free to comment. @Linus: I believe it would be a good idea if your gateway patch was based on this patchset. Cheers, Marek