linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] percpu fix for v5.9-rc6
@ 2020-09-17 20:45 Dennis Zhou
  2020-09-18  1:05 ` Linus Torvalds
  2020-09-18  1:10 ` pr-tracker-bot
  0 siblings, 2 replies; 22+ messages in thread
From: Dennis Zhou @ 2020-09-17 20:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Tejun Heo, Christoph Lameter, linux-mm, linux-kernel

Hi Linus,

This is a fix for the first chunk size calculation where the variable
length array incorrectly used # of longs instead of bytes of longs. This
came in as a code fix and not a bug report, so I don't think it was
widely problematic. I believe it worked out due to it being memblock
memory and alignment requirements working in our favor.

Thanks,
Dennis

The following changes since commit f75aef392f869018f78cfedf3c320a6b3fcfda6b:

  Linux 5.9-rc3 (2020-08-30 16:01:54 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-5.9-fixes

for you to fetch changes up to b3b33d3c43bbe0177d70653f4e889c78cc37f097:

  percpu: fix first chunk size calculation for populated bitmap (2020-09-17 17:34:39 +0000)

----------------------------------------------------------------
Sunghyun Jin (1):
      percpu: fix first chunk size calculation for populated bitmap

 mm/percpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/percpu.c b/mm/percpu.c
index f4709629e6de..1ed1a349eab8 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -1316,7 +1316,7 @@ static struct pcpu_chunk * __init pcpu_alloc_first_chunk(unsigned long tmp_addr,
 
 	/* allocate chunk */
 	alloc_size = sizeof(struct pcpu_chunk) +
-		BITS_TO_LONGS(region_size >> PAGE_SHIFT);
+		BITS_TO_LONGS(region_size >> PAGE_SHIFT) * sizeof(unsigned long);
 	chunk = memblock_alloc(alloc_size, SMP_CACHE_BYTES);
 	if (!chunk)
 		panic("%s: Failed to allocate %zu bytes\n", __func__,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-09-19 15:15 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 20:45 [GIT PULL] percpu fix for v5.9-rc6 Dennis Zhou
2020-09-18  1:05 ` Linus Torvalds
2020-09-18 16:23   ` Gustavo A. R. Silva
2020-09-18 17:23     ` Linus Torvalds
2020-09-18 19:34       ` Gustavo A. R. Silva
2020-09-18 19:37         ` Linus Torvalds
2020-09-18 20:02           ` Matthew Wilcox
2020-09-18 20:14             ` Linus Torvalds
2020-09-18 20:29               ` Arvind Sankar
2020-09-18 20:40                 ` Linus Torvalds
2020-09-18 21:00                   ` Arvind Sankar
2020-09-18 21:18                     ` Linus Torvalds
2020-09-18 22:39                       ` Arvind Sankar
2020-09-19  1:28                         ` Linus Torvalds
2020-09-19  2:53                           ` Arvind Sankar
2020-09-19  3:02                             ` Matthew Wilcox
2020-09-19  3:04                             ` Linus Torvalds
2020-09-19  2:45                         ` Matthew Wilcox
2020-09-19  3:37                           ` Arvind Sankar
2020-09-19 15:15                         ` David Laight
2020-09-18 20:03           ` Gustavo A. R. Silva
2020-09-18  1:10 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).