Blame SOURCES/rhel8_freepointer.patch

f27a4c
From e09e3c038c853f9a332cf05a17e5fdee1c7837e0 Mon Sep 17 00:00:00 2001
f27a4c
From: Lianbo Jiang <lijiang@redhat.com>
f27a4c
Date: Thu, 18 Nov 2021 09:55:45 +0800
f27a4c
Subject: [PATCH] fix freepointer issue
f27a4c
f27a4c
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
f27a4c
---
f27a4c
 memory.c | 5 ++---
f27a4c
 1 file changed, 2 insertions(+), 3 deletions(-)
f27a4c
f27a4c
diff --git a/memory.c b/memory.c
f27a4c
index a3cf8a86728d..81db9c7bee9f 100644
f27a4c
--- a/memory.c
f27a4c
+++ b/memory.c
f27a4c
@@ -19340,9 +19340,8 @@ freelist_ptr(struct meminfo *si, ulong ptr, ulong ptr_addr)
f27a4c
 	if (VALID_MEMBER(kmem_cache_random)) {
f27a4c
 		/* CONFIG_SLAB_FREELIST_HARDENED */
f27a4c
 
f27a4c
-		if (THIS_KERNEL_VERSION >= LINUX(5,7,0))
f27a4c
-			ptr_addr = (sizeof(long) == 8) ? bswap_64(ptr_addr)
f27a4c
-						       : bswap_32(ptr_addr);
f27a4c
+		ptr_addr = (sizeof(long) == 8) ? bswap_64(ptr_addr)
f27a4c
+					       : bswap_32(ptr_addr);
f27a4c
 		return (ptr ^ si->random ^ ptr_addr);
f27a4c
 	} else
f27a4c
 		return ptr;
f27a4c
-- 
f27a4c
2.30.2
f27a4c