From ae0f2f6f089ff75dc83a61a88c7471b1d8a5bc45 Mon Sep 17 00:00:00 2001 From: Patsy Griffin Date: Tue, 11 Nov 2025 13:11:00 -0500 Subject: [PATCH] madvise(2): madvise can return EBUSY on MADV_SOFT_OFFLINE requests. (RHEL-115501) Resolves: RHEL-115501 --- RHEL-115501.patch | 33 +++++++++++++++++++++++++++++++++ man-pages.spec | 4 ++++ 2 files changed, 37 insertions(+) create mode 100644 RHEL-115501.patch diff --git a/RHEL-115501.patch b/RHEL-115501.patch new file mode 100644 index 0000000..21afcb1 --- /dev/null +++ b/RHEL-115501.patch @@ -0,0 +1,33 @@ +commit 6f505f11556a13dd229dea904f54da2c1f3f90d4 +Author: tyberry@redhat.com +Date: Tue Nov 26 11:12:03 2024 -0500 + + madvise.2: MADV_SOFT_OFFLINE requests can report EBUSY + + If the page could not be offlined madvise will report EBUSY. + This might occur if the page is currently in use or locked. + + Signed-off-by: Tyonnchie Berry + Message-Id: + Acked-by: "Luis Claudio R. Goncalves" + [alx: wfix, ffix, and other tweaks] + Signed-off-by: Alejandro Colomar + +diff --git a/man2/madvise.2 b/man2/madvise.2 +index 4f2210ee2..0dd481d21 100644 +--- a/man2/madvise.2 ++++ b/man2/madvise.2 +@@ -702,6 +702,13 @@ The map exists, but the area maps something that isn't a file. + .BR MADV_COLLAPSE ) + Could not charge hugepage to cgroup: cgroup limit exceeded. + .TP ++.B EBUSY ++(for ++.BR MADV_SOFT_OFFLINE ) ++Any pages within the specified address range ++could not be offlined. ++This might occur if the page is currently in use or locked. ++.TP + .B EFAULT + .I advice + is diff --git a/man-pages.spec b/man-pages.spec index 230b723..f912c4b 100644 --- a/man-pages.spec +++ b/man-pages.spec @@ -67,6 +67,9 @@ Patch30: RHEL-87647-3.patch Patch31: RHEL-87647-2.patch Patch32: RHEL-87647-4.patch +# madvise(2) can return -EBUSY on MADV_SOFT_OFFLINE requests +Patch33: RHEL-115501.patch + %description A large collection of manual pages from the Linux Documentation Project (LDP). @@ -85,6 +88,7 @@ A large collection of manual pages from the Linux Documentation Project (LDP). %patch -p1 -P 30 %patch -p1 -P 31 %patch -p1 -P 32 +%patch -p1 -P 33 ## Remove man pages we are not going to use ##