Blame SOURCES/rhel8_freepointer.patch

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