Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932652AbcKBRME convert rfc822-to-8bit (ORCPT ); Wed, 2 Nov 2016 13:12:04 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:60198 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932221AbcKBRMC (ORCPT ); Wed, 2 Nov 2016 13:12:02 -0400 Date: Wed, 2 Nov 2016 18:11:49 +0100 From: Sebastian Andrzej Siewior To: Trond Myklebust Cc: Schumaker Anna , List Linux NFS Mailing , List Linux Kernel Mailing , "tglx@linutronix.de" Subject: Re: [PATCH v3] NFSv4: replace seqcount_t with a rw_semaphore Message-ID: <20161102171149.kl66dlmlrc44zock@linutronix.de> References: <20161021164727.24485-1-bigeasy@linutronix.de> <20161028210511.k7hrsfxovti7gqtu@linutronix.de> <747E2CCB-3D83-40FD-8B31-46AB5A5E8592@primarydata.com> <20161031131958.mrrez5t7sow75p6v@linutronix.de> <51E3F753-2D1F-4370-BFEB-BD8356D622A1@primarydata.com> <20161031155616.fqbqy53bwpanufhn@linutronix.de> <40147FA4-9FD8-4349-B309-751DFCE875A2@primarydata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <40147FA4-9FD8-4349-B309-751DFCE875A2@primarydata.com> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 396 Lines: 8 On 2016-10-31 16:11:02 [+0000], Trond Myklebust wrote: > > Yes, and yes. We can’t rely on the list pointers remaining correct, so we restart the list scan and we use the ops->state_flag_bit to signal whether or not state has been recovered for the entry being scanned. but this is tested at the top of the loop and by then you look at lists' ->next pointer which might be invalid. Sebastian