From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:51969 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758599AbdADJGN (ORCPT ); Wed, 4 Jan 2017 04:06:13 -0500 Date: Wed, 4 Jan 2017 10:05:42 +0100 From: Jan Kara To: Amir Goldstein Cc: Jan Kara , linux-fsdevel , Lino Sanfilippo , Miklos Szeredi , Paul Moore Subject: Re: [PATCH 15/22] fanotify: Release SRCU lock when waiting for userspace response Message-ID: <20170104090542.GK3780@quack2.suse.cz> References: <20161222091538.28702-1-jack@suse.cz> <20161222091538.28702-16-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon 26-12-16 17:22:58, Amir Goldstein wrote: > > #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS > > static int fanotify_get_response(struct fsnotify_group *group, > > - struct fanotify_perm_event_info *event) > > + struct fsnotify_mark *inode_mark, > > + struct fsnotify_mark *vfsmount_mark, > > + struct fanotify_perm_event_info *event, > > + int *srcu_idx) > > { > > int ret; > > > > @@ -69,6 +72,15 @@ static int fanotify_get_response(struct fsnotify_group *group, > > > > wait_event(group->fanotify_data.access_waitq, event->response); > > > > + if (!fsnotify_prepare_user_wait(inode_mark, vfsmount_mark, srcu_idx)) { > > Since it is not clear for reader of this code the conditions where > fsnotify_prepare_user_wait() can fail, a comment here would be nice > to explain the choice of ALLOW Good point. Will add. Honza -- Jan Kara SUSE Labs, CR