Skip to content

redfs-rhel10_0: Linux 6.12: SIGBUS a DLM fault on an aborted connection instead of retrying - #257

Merged
hbirth merged 1 commit into
DDNStorage:redfs-rhel10_0from
achhenderson:redfs-rhel10-fault-abort-sigbus
Oct 13, 2026
Merged

hbirth merged 1 commit into
DDNStorage:redfs-rhel10_0from
achhenderson:redfs-rhel10-fault-abort-sigbus

Conversation

@achhenderson

Copy link
Copy Markdown
Collaborator

Fixes RED-51342 on redfs-rhel10_0.

Port to Linux 6.12 of #253 (commit 37a9748, merged on redfs-ubuntu-hwe-6.17.0-16.16-24.04.1). The vulnerable code is identical on this branch — the TRIED-removal (52b0cfb here) is present and the fault slow path has no connection check — so the patch applied with only a line offset. See #253 for the full analysis and the runtime verification on tyan-h3-u24.

Testing

Compile-tested: fs/fuse/file.o builds against this tree with no warnings or errors.

With the writeback cache and DLM, fuse_filemap_fault()'s slow path
drops the fault lock, takes the DLM grant and reads the batch window
into private folios, and returns VM_FAULT_RETRY. Errors on that path
are ignored. Its comment expects a persistent error to end on the
blocking path, which turns it into SIGBUS. Since 52b0cfb ("fuse: drop
fault-around for shared-writable mappings under DLM") a
FAULT_FLAG_TRIED pass takes the drop-and-retry path too, so a retried
fault that keeps failing never gets there. Once the fault lock is
dropped, VM_FAULT_RETRY is the only answer the fault can give.

An aborted connection fails every request, so a task touching a
non-resident page of a mapping on that mount refaults forever. It
spends all its time in the kernel, ignores every signal but SIGKILL,
and its mapping keeps the mount busy, so the mount cannot be unmounted
and recovered. This was seen after the redfsd hang watchdog aborted a
hung connection: four fio mmap jobs ran at 100% CPU for minutes, each
pass allocating and freeing the batch folios in
fuse_fault_read_private_folios(), and the client agent's umount failed
with EBUSY until they were killed.

Check the connection on the slow path while the fault lock is still
held, and return VM_FAULT_SIGBUS when it is gone, which is what a
fault on a non-resident page of an aborted mount returns without DLM.
Resident pages with a recorded grant still map through the fast path.

A persistent error on a live connection, such as a server that fails
every READ, still loops the same way. Ending that needs state carried
from one retry to the next and is left out here.

This is a port to Linux 6.12 of commit 37a9748 from
redfs-ubuntu-hwe-6.17.0-16.16-24.04.1 (PR DDNStorage#253); the code is identical
on both branches and the patch applied with only a line offset.

Signed-off-by: Sven Oehme <soehme@ddn.com>
Signed-off-by: Allison Henderson <ahenderson@ddn.com>
@hbirth
hbirth merged commit ae0e8f9 into DDNStorage:redfs-rhel10_0 Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants