madvise(2): madvise can return EBUSY on MADV_SOFT_OFFLINE requests. (RHEL-115501)

Resolves: RHEL-115501
This commit is contained in:
Patsy Griffin 2025-11-11 13:11:00 -05:00
parent a68a9cd9b8
commit ae0f2f6f08
2 changed files with 37 additions and 0 deletions

33
RHEL-115501.patch Normal file
View File

@ -0,0 +1,33 @@
commit 6f505f11556a13dd229dea904f54da2c1f3f90d4
Author: tyberry@redhat.com <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 <tyberry@redhat.com>
Message-Id: <Z0XzU9R9Kx0RoeUG@redhat.com>
Acked-by: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
[alx: wfix, ffix, and other tweaks]
Signed-off-by: Alejandro Colomar <alx@kernel.org>
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

View File

@ -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 ##