mm/sparse: guard the size of mem_section is power of 2
authorWei Yang <richard.weiyang@gmail.com>
Tue, 16 Apr 2024 01:25:59 +0000 (01:25 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 6 May 2024 00:53:40 +0000 (17:53 -0700)
commit122ff80e12b3aa586d702b7fb651a99d443e7777
tree42829920f2980eca95d987e4288c6779783a7224
parent5ec5aab7754e4ed5b91be103427e00ab9a35f67d
mm/sparse: guard the size of mem_section is power of 2

We usually have this check, while commit 2a3cb8baef71 ("mm/sparse: delete
old sparse_init and enable new one") missed to take it.

Link: https://lkml.kernel.org/r/20240416012559.4536-1-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Acked-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: "Mike Rapoport (IBM)" <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/sparse.c