From patchwork Tue Jan 8 16:46:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 10752469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F4F7746 for ; Tue, 8 Jan 2019 16:46:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EEE227968 for ; Tue, 8 Jan 2019 16:46:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 62E0B28464; Tue, 8 Jan 2019 16:46:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19C2F27968 for ; Tue, 8 Jan 2019 16:46:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728730AbfAHQqR (ORCPT ); Tue, 8 Jan 2019 11:46:17 -0500 Received: from mx2.suse.de ([195.135.220.15]:49386 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728617AbfAHQqR (ORCPT ); Tue, 8 Jan 2019 11:46:17 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E2182B128; Tue, 8 Jan 2019 16:46:15 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 85B561E157A; Tue, 8 Jan 2019 17:46:14 +0100 (CET) From: Jan Kara To: Cc: Amir Goldstein , Vivek Trivedi , Orion Poplawski , Konstantin Khlebnikov , Jan Kara Subject: [PATCH 0/4] fanotify: Make wait for permission event response interruptible Date: Tue, 8 Jan 2019 17:46:07 +0100 Message-Id: <20190108164611.11440-1-jack@suse.cz> X-Mailer: git-send-email 2.16.4 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, When waiting for response to fanotify permission events, we currently use uninterruptible waits. That makes code simple however it can cause lots of processes to end up in uninterruptible sleep with hard reboot being the only alternative in case fanotify listener process stops responding (e.g. due to a bug in its implementation) - reported e.g. in [1]. Uninterruptible sleep also makes system hibernation fail if the listener gets frozen before the process generating fanotify permission event (as reported e.g. here [2]). This patch set modifies fanotify so that it will use interruptible wait when waiting for fanotify permission event response. Patches are based on current Linus' tree for the ease of testing (I plan to rebase them on top of Amir's pending changes later). I have also create LTP test which stresses handling of permission events while sending processes signals to test the new code - I'll send that separately later. Review, comments, and testing are welcome. [1] https://lore.kernel.org/lkml/153474898224.6806.12518115530793064797.stgit@buzz/ [2] https://lore.kernel.org/lkml/c1bb16b7-9eee-9cea-2c96-a512d8b3b9c7@nwra.com/ Honza