Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936284AbcKJUok (ORCPT ); Thu, 10 Nov 2016 15:44:40 -0500 Received: from mail-yw0-f181.google.com ([209.85.161.181]:36321 "EHLO mail-yw0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935817AbcKJUoi (ORCPT ); Thu, 10 Nov 2016 15:44:38 -0500 MIME-Version: 1.0 X-Originating-IP: [217.173.44.24] In-Reply-To: <20161110194625.GG31098@quack2.suse.cz> References: <20161102220851.GA1839@veci.piliscsaba.szeredi.hu> <20161105213411.GA32353@quack2.suse.cz> <20161109111005.GA32353@quack2.suse.cz> <20161110194625.GG31098@quack2.suse.cz> From: Miklos Szeredi Date: Thu, 10 Nov 2016 21:44:36 +0100 Message-ID: Subject: Re: fsnotify_mark_srcu wtf? To: Jan Kara Cc: Amir Goldstein , Eric Paris , linux-fsdevel , linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 710 Lines: 18 On Thu, Nov 10, 2016 at 8:46 PM, Jan Kara wrote: > Except it doesn't quite work. We can pin the current marks by a refcount > but they can still be removed from the list so after we regain srcu lock, > we are not sure their ->next pointers still point to still allocated marks > :-| Sadly I realized this only after implementing all this. I think the real problem is the synchronous nature of the notification interface, that really doesn't fit the permission events model very well. If it were to be changed around to an async interface then all the marks could be iterated, the permission events queued and then the srcu lock can be released for good. Did I miss something? Thanks, Miklos