Blame SOURCES/0294-mm-grub_real_malloc-Make-small-allocs-comment-match-.patch

fd0330
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
fd0330
From: Daniel Axtens <dja@axtens.net>
fd0330
Date: Thu, 25 Nov 2021 02:22:47 +1100
fd0330
Subject: [PATCH] mm: grub_real_malloc(): Make small allocs comment match code
fd0330
fd0330
Small allocations move the region's *first pointer. The comment
fd0330
says that this happens for allocations under 64K. The code says
fd0330
it's for allocations under 32K. Commit 45bf8b3a7549 changed the
fd0330
code intentionally: make the comment match.
fd0330
fd0330
Fixes: 45bf8b3a7549 (* grub-core/kern/mm.c (grub_real_malloc): Decrease cut-off of moving the)
fd0330
fd0330
Signed-off-by: Daniel Axtens <dja@axtens.net>
fd0330
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
fd0330
(cherry picked from commit a847895a8d000bdf27ad4d4326f883a0eed769ca)
fd0330
---
fd0330
 grub-core/kern/mm.c | 2 +-
fd0330
 1 file changed, 1 insertion(+), 1 deletion(-)
fd0330
fd0330
diff --git a/grub-core/kern/mm.c b/grub-core/kern/mm.c
fd0330
index fb20e93acf..db7e0b2a5b 100644
fd0330
--- a/grub-core/kern/mm.c
fd0330
+++ b/grub-core/kern/mm.c
fd0330
@@ -306,7 +306,7 @@ grub_real_malloc (grub_mm_header_t *first, grub_size_t n, grub_size_t align)
fd0330
 	  /* Mark find as a start marker for next allocation to fasten it.
fd0330
 	     This will have side effect of fragmenting memory as small
fd0330
 	     pieces before this will be un-used.  */
fd0330
-	  /* So do it only for chunks under 64K.  */
fd0330
+	  /* So do it only for chunks under 32K.  */
fd0330
 	  if (n < (0x8000 >> GRUB_MM_ALIGN_LOG2)
fd0330
 	      || *first == cur)
fd0330
 	    *first = prev;