From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dibyendu Majumdar Subject: Re: [PATCH RFC] Let pseudo->users loop on duplicate version of list Date: Tue, 11 Jul 2017 22:04:08 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from mail-wr0-f171.google.com ([209.85.128.171]:32805 "EHLO mail-wr0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932536AbdGKVEK (ORCPT ); Tue, 11 Jul 2017 17:04:10 -0400 Received: by mail-wr0-f171.google.com with SMTP id r103so6047461wrb.0 for ; Tue, 11 Jul 2017 14:04:09 -0700 (PDT) In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Christopher Li Cc: Luc Van Oostenryck , Linux-Sparse , Linus Torvalds Hi Chris, On 11 July 2017 at 21:53, Christopher Li wrote: > Ping, Any taker want to review or suggest alternative > way to fix the nested loop delete bug? > >> Instead of marking the entry deleted. I just use a duplicate >> version of the list->list[] when doing the loop. It will have >> unwanted effect that iterator will issue some ptr are already >> deleted. Other than that, it is very straight forward. >> I think that duplicating a list because that list is being modified is quite a sensible thing to do. My only suggestion would be that perhaps you could have a dup() step that is separate so that you can use the normal iterator macro after duplicating. Regards Dibyendu