[RFC v3 -next] cma: Enforce non-zero pageblock_order during cma_init_reserved_mem()

Zi Yan ziy at nvidia.com
Sat Oct 12 02:04:09 AEDT 2024


On 11 Oct 2024, at 10:56, Ritesh Harjani (IBM) wrote:

> cma_init_reserved_mem() checks base and size alignment with
> CMA_MIN_ALIGNMENT_BYTES. However, some users might call this during
> early boot when pageblock_order is 0. That means if base and size does
> not have pageblock_order alignment, it can cause functional failures
> during cma activate area.
>
> So let's enforce pageblock_order to be non-zero during
> cma_init_reserved_mem().
>
> Acked-by: David Hildenbrand <david at redhat.com>
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list at gmail.com>
> ---
> v2 -> v3: Separated the series into 2 as discussed in v2.
> [v2]: https://lore.kernel.org/linuxppc-dev/cover.1728585512.git.ritesh.list@gmail.com/
>
>  mm/cma.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>

Acked-by: Zi Yan <ziy at nvidia.com>

Best Regards,
Yan, Zi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 854 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20241011/3671fee2/attachment.sig>


More information about the Linuxppc-dev mailing list