lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 21 Mar 2015 01:56:30 +0100
From:	Lino Sanfilippo <LinoSanfilippo@....de>
To:	Fabian Frederick <fabf@...net.be>, linux-kernel@...r.kernel.org
CC:	Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>,
	David Howells <dhowells@...hat.com>,
	Eric Paris <eparis@...hat.com>
Subject: Re: [PATCH 1/1 linux-next] fanotify: fix a lock in fanotify_should_send_event()

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 <fabf@...net.be>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists