Skip to content

mm, mremap: fix mremap() expanding for vma's with vm_ops->close()

Donald Dutile requested to merge ddutile/centos-stream-9:j9198 into main

Upstream commit ca3d76b0aa80 was backported in RHEL-9.2 as commit 8c20bfd2. This causes a failure when multiple threads within a process try to expand an mmap, and mremap tries to merge the adjacent vma's.

RHEL-9.3 backported one fix from upstream v6.2-rc1, 6f12be792fde as RHEL-9.3 commit 0517036a, as part of the 100+, RHEL-9.3 Proactive MM fixes.

In researching this reported bug, another Fixes patch for ca3d76b0aa80 was found from v6.2-rc7, d014cd7c1c35. So, this MR is backporting this fix, which will be z-streamed into 9.3; after which it will be z-streamed into 9.2 along with 9.3's 0517036a commit, so 9.2 is completely repaired.

A test program was provided in Jira RHEL-9198 to show the bug, and was used to replicate the bug on a VM, and to demonstrate its repair first in 9.3, then with this added commit. A long term test on a SQL application by a large fintech company reported seeing another vma-merge problem that has the signature that this MR repairs.

The test program will be included in future kernel-mm testing as a means to regression test mmap-based, vma-merge logic.

Please review, approve & merge into 9.4 asap, as OpenShift and the large fintech customer are anxiously awaiting the zstream-ing of the needed patches to 9.2.

JIRA: https://issues.redhat.com/browse/RHEL-9198

Signed-off-by: Donald Dutile ddutile@redhat.com

Merge request reports

Loading