From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872AbbCUA4i (ORCPT ); Fri, 20 Mar 2015 20:56:38 -0400 Received: from mout.gmx.net ([212.227.17.22]:62163 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752552AbbCUA4f (ORCPT ); Fri, 20 Mar 2015 20:56:35 -0400 Message-ID: <550CC1BE.5050303@gmx.de> Date: Sat, 21 Mar 2015 01:56:30 +0100 From: Lino Sanfilippo User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Fabian Frederick , linux-kernel@vger.kernel.org CC: Andrew Morton , Jan Kara , David Howells , Eric Paris Subject: Re: [PATCH 1/1 linux-next] fanotify: fix a lock in fanotify_should_send_event() References: <1426884968-1747-1-git-send-email-fabf@skynet.be> In-Reply-To: <1426884968-1747-1-git-send-email-fabf@skynet.be> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:lsDmWwDYH+tlROODGO35mp2cbMGdefYasb2eU4GfFZMj2p65JGF UDxK7XdjQND390d+amHZK58nGb/qQoRy1WPPvCoexY34t0qUq/VPmx25lqfypgFhaSvPrBI weFK0qX16BVE1D/CUNI2kevREECW/SuNZtrvDy1MN/1hfFwFPjUqFy0PWAV9I2PzpNfaRiy bh/fN2DD0k30T1utf3Tzw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 20.03.2015 21:56, Fabian Frederick wrote: > ltp/fanotify02 was locked since commit 66ba93c0d7fe > ("fanotify: don't set FAN_ONDIR implicitly on a marks ignored mask") > > Signed-off-by: Fabian Frederick > --- > fs/notify/fanotify/fanotify.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c > index d2f97ec..7b3a50b 100644 > --- a/fs/notify/fanotify/fanotify.c > +++ b/fs/notify/fanotify/fanotify.c > @@ -140,8 +140,8 @@ static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark, > } > > if (d_is_dir(path->dentry) && > - !(marks_mask & FS_ISDIR & ~marks_ignored_mask)) > - return false; > + (marks_mask & FS_ISDIR & ~marks_ignored_mask)) > + return true; > > if (event_mask & FAN_ALL_OUTGOING_EVENTS & marks_mask & > ~marks_ignored_mask) > I dont think that this is an issue in kernel code. The test code tries to get events for the current directory but never sets the FAN_ONDIR flag for the concerning mark - so it hangs because it is waiting for events that are never generated. Adding FAN_ONDIR to the set of mark flags should fix the test code. Regards, Lino