linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] mm: skip wait in wait_sb_inodes() for hangable-writeback mappings
@ 2025-11-20 18:42 Joanne Koong
  2025-11-20 18:42 ` [PATCH v1 1/2] mm: rename AS_WRITEBACK_MAY_DEADLOCK_ON_RECLAIM to AS_WRITEBACK_MAY_HANG Joanne Koong
  2025-11-20 18:42 ` [PATCH v1 2/2] fs/writeback: skip inodes with potential writeback hang in wait_sb_inodes() Joanne Koong
  0 siblings, 2 replies; 15+ messages in thread
From: Joanne Koong @ 2025-11-20 18:42 UTC (permalink / raw)
  To: akpm; +Cc: david, linux-mm, shakeel.butt, athul.krishna.kr, miklos, stable

As reported by Athul upstream in [1], there is a userspace regression caused
by commit 0c58a97f919c ("fuse: remove tmp folio for writebacks and internal rb
tree") where if there is a bug in a fuse server that causes the server to
never complete writeback, it will make wait_sb_inodes() wait forever, causing
sync paths to hang.

This is a resubmission of this patch [2] that was dropped from the original
series due to a buggy/malicious server still being able to hold up sync() /
the system in other ways if they wanted to, but the wait_sb_inodes() path is
particularly common and easier to hit for malfunctioning servers.

Thanks,
Joanne

[1] https://lore.kernel.org/regressions/CAJnrk1ZjQ8W8NzojsvJPRXiv9TuYPNdj8Ye7=Cgkj=iV_i8EaA@mail.gmail.com/T/#t
[2] https://lore.kernel.org/linux-fsdevel/20241122232359.429647-4-joannelkoong@gmail.com/

Joanne Koong (2):
  mm: rename AS_WRITEBACK_MAY_DEADLOCK_ON_RECLAIM to
    AS_WRITEBACK_MAY_HANG
  fs/writeback: skip inodes with potential writeback hang in
    wait_sb_inodes()

 fs/fs-writeback.c       |  3 +++
 fs/fuse/file.c          |  2 +-
 include/linux/pagemap.h | 10 +++++-----
 mm/vmscan.c             |  3 +--
 4 files changed, 10 insertions(+), 8 deletions(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2025-12-04 18:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-20 18:42 [PATCH v1 0/2] mm: skip wait in wait_sb_inodes() for hangable-writeback mappings Joanne Koong
2025-11-20 18:42 ` [PATCH v1 1/2] mm: rename AS_WRITEBACK_MAY_DEADLOCK_ON_RECLAIM to AS_WRITEBACK_MAY_HANG Joanne Koong
2025-11-20 20:08   ` David Hildenbrand (Red Hat)
2025-11-20 21:28     ` Joanne Koong
2025-11-20 18:42 ` [PATCH v1 2/2] fs/writeback: skip inodes with potential writeback hang in wait_sb_inodes() Joanne Koong
2025-11-20 20:23   ` David Hildenbrand (Red Hat)
2025-11-20 21:20     ` Joanne Koong
2025-11-24 13:58       ` David Hildenbrand (Red Hat)
2025-11-25  1:10         ` Joanne Koong
2025-11-26 10:19           ` Miklos Szeredi
2025-11-26 10:41             ` David Hildenbrand (Red Hat)
2025-11-26 10:55           ` David Hildenbrand (Red Hat)
2025-11-26 17:58             ` Joanne Koong
2025-12-03  9:28               ` Miklos Szeredi
2025-12-04 18:06                 ` Joanne Koong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox