From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50E49C10F11 for ; Wed, 10 Apr 2019 16:44:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 156A520830 for ; Wed, 10 Apr 2019 16:44:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554914661; bh=UeRiNxtW38oyCgxg+dy+CJfGQCGSzsaM60gJWN9xNPQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=wUgtAdu3/+yozwxmKsXMg7VuSzDid4v9qg2Xf+QJcjdPnDlj0TeuLMPZ+GjKkxW4q qXtM3mdTH2/nd1IH+YJ3AqtHgbPPvmtLdfq2JLJDuKWJzluKvwzBJ+c+GSoHn6Ayzw OYk4txt81t2wy+d4xe48OnaGnJYLpr31tpuqRaIk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729089AbfDJQoU (ORCPT ); Wed, 10 Apr 2019 12:44:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:54336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727171AbfDJQoU (ORCPT ); Wed, 10 Apr 2019 12:44:20 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 64344206B6; Wed, 10 Apr 2019 16:44:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554914659; bh=UeRiNxtW38oyCgxg+dy+CJfGQCGSzsaM60gJWN9xNPQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ATsmnjzqAq2HKkfeABuKm9Q81mjQ0UGEiOlOHCD4Pk8Jkj37AkZPMfsrrkaWTvMP2 zLr8dbpXcA6kONLxMMHG/x77JkCvgT/dwdAndN4D4XXltoPliFO/fqZYCvwdSf0fEW pIyrZv5+dWiEJLyeUbaigOA6BfhPI45FoHW/2Bqk= Date: Wed, 10 Apr 2019 12:44:18 -0400 From: Sasha Levin To: Matthew Ruffell Cc: stable@vger.kernel.org Subject: Re: [PATCH 4.4 0/5] fanotify: Fix notification subsystem hang Message-ID: <20190410164418.GD11568@sasha-vm> References: <20190410045456.23298-1-matthew.ruffell@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190410045456.23298-1-matthew.ruffell@canonical.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, Apr 10, 2019 at 04:54:51PM +1200, Matthew Ruffell wrote: >BugLink: https://bugs.launchpad.net/bugs/1775165 > >[Note to upstream] >I understand that this patch is a little long for -stable, but this patch series >fixes a real issue, seen by real users, is testable, and is made up from >upstream commits. Please consider it. > >[Impact] > >When userspace tasks which are processing fanotify permission events act >incorrectly, the fsnotify_mark_srcu SRCU is held indefinitely which causes >the whole notification subsystem to hang. > >This has been seen in production, and it can also be seen when running the >Linux Test Project testsuite, specifically fanotify07. > >[Fix] > >Instead of holding the SRCU lock while waiting for userspace to respond, >which may never happen, or not in the order we are expecting, we drop the >fsnotify_mark_srcu SRCU lock before waiting for userspace response, and then >reacquire the lock again when userspace responds. > >The fixes are from a series of upstream commits: > >05f0e38724e8449184acd8fbf0473ee5a07adc6c (cherry-pick) >9385a84d7e1f658bb2d96ab798393e4b16268aaa (backport) >abc77577a669f424c5d0c185b9994f2621c52aa4 (backport) > >The following are upstream commits necessary for the fixes to function: > >35e481761cdc688dbee0ef552a13f49af8eba6cc (backport) >0918f1c309b86301605650c836ddd2021d311ae2 (cherry-pick) This would also make sense for 4.9, right? I don't want to fix 4.4 without fixing 4.9 as well. -- Thanks, Sasha