All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Matthew Ruffell <matthew.ruffell@canonical.com>
Cc: stable@vger.kernel.org
Subject: Re: [PATCH 4.4 0/5] fanotify: Fix notification subsystem hang
Date: Wed, 10 Apr 2019 12:44:18 -0400	[thread overview]
Message-ID: <20190410164418.GD11568@sasha-vm> (raw)
In-Reply-To: <20190410045456.23298-1-matthew.ruffell@canonical.com>

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

  parent reply	other threads:[~2019-04-10 16:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10  4:54 [PATCH 4.4 0/5] fanotify: Fix notification subsystem hang Matthew Ruffell
2019-04-10  4:54 ` [PATCH 4.4 1/5] fsnotify: turn fsnotify reaper thread into a workqueue job Matthew Ruffell
2019-04-10  4:54 ` [PATCH 4.4 2/5] fsnotify: avoid spurious EMFILE errors from inotify_init() Matthew Ruffell
2019-04-10  4:54 ` [PATCH 4.4 3/5] fsnotify: Provide framework for dropping SRCU lock in ->handle_event Matthew Ruffell
2019-04-10  4:54 ` [PATCH 4.4 4/5] fsnotify: Pass fsnotify_iter_info into handle_event handler Matthew Ruffell
2019-04-10  4:54 ` [PATCH 4.4 5/5] fanotify: Release SRCU lock when waiting for userspace response Matthew Ruffell
2019-04-10 16:44 ` Sasha Levin [this message]
2019-04-11  3:54   ` [PATCH 4.4 0/5] fanotify: Fix notification subsystem hang Matthew Ruffell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190410164418.GD11568@sasha-vm \
    --to=sashal@kernel.org \
    --cc=matthew.ruffell@canonical.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.