From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Paris Subject: Re: [PATCH] fs, fanotify: dont send notification event for coredump file Date: Mon, 26 Mar 2012 13:03:43 -0400 Message-ID: <1332781423.384.1.camel@localhost> References: <20120325012813.GD3276@Neptun> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org, vasily.novikov@kaspersky.com To: Lino Sanfilippo Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50863 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933059Ab2CZS4p (ORCPT ); Mon, 26 Mar 2012 14:56:45 -0400 In-Reply-To: <20120325012813.GD3276@Neptun> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, 2012-03-25 at 03:28 +0200, Lino Sanfilippo wrote: > Currently fsnotify events are created for core dump files. This may > lead to problems if a listener has registered with fanotify to watch > permission events for the whole filesystem: > If it is the listener itself that causes the creation of a core dump file > (due to a segfault) a permission event is created but never granted > (the listener is not running any more). > OTOH the listener cant unregister either, since its waiting for its own > ack. Since no file accesses are answered any more, eventually the whole > system freezes. > > This patch solves the problem by allowing the core dump file to be > created without sending a notification event. For this reason the > FMODE_NONOTIFY flag is no longer cleared in build_open_flags() but > in the caller. Furthermore it is set for the creation of the core dump > file. > Also callers of filp_open() are now able to specify FMODE_NONOTIFY if > they dont want notification events to be created for an opened file. > > Reported-by: Vasily Novikov > Signed-off-by: Lino Sanfilippo How does this work with something like abrt, which causes core files to be created in a known dir. It then watches (I have no idea if it uses *notify) for new core files and processes them when they appear. Would we be able to get any notification of core files with this patch? Maybe we need a way to just not allow ourselves to block on core files?