[GIT PULL] gfs2: Recognize mmap + page fault self-recursion to prevent deadlocks

From: Andreas Gruenbacher
Date: Wed Jun 02 2021 - 07:27:02 EST


Hi Linus,

please consider pulling the following fixes for partially addressing the mmap +
page fault deadlocks. It's not clear to me if and when we'll find a better
solution, and those fixes prevent a kernel BUG in the simple self-recursion
case at least. (This is the case that the new fstest [*] reproduces.)

[*] https://lore.kernel.org/fstests/20210531152604.240462-1-agruenba@xxxxxxxxxx/

Thanks,
Andreas

The following changes since commit d5b8145455c629e7f157d2da46a9b2fba483f235:

Revert "gfs2: Fix mmap locking for write faults" (2021-06-01 23:16:42 +0200)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git tags/gfs2-v5.13-rc2-fixes3

for you to fetch changes up to 485805ef8389eb1caa484cbb66e815afac00879d:

gfs2: Fix mmap + page fault deadlocks (part 1) (2021-06-02 11:44:54 +0200)

----------------------------------------------------------------
gfs2: Recognize mmap + page fault self-recursion to prevent deadlocks

----------------------------------------------------------------
Andreas Gruenbacher (4):
gfs2: Clean up the error handling in gfs2_page_mkwrite
gfs2: Add wrapper for iomap_file_buffered_write
gfs2: Add gfs2_holder_is_compatible helper
gfs2: Fix mmap + page fault deadlocks (part 1)

fs/gfs2/file.c | 117 +++++++++++++++++++++++++++++++++++++++-----------------
fs/gfs2/glock.h | 14 +++++++
2 files changed, 95 insertions(+), 36 deletions(-)