Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 76f26535 authored by Hyesoo Yu's avatar Hyesoo Yu Committed by Andrew Morton
Browse files

mm: page_alloc: check the order of compound page even when the order is zero

For compound pages, the head sets the PG_head flag and the tail sets the
compound_head to indicate the head page.  If a user allocates a compound
page and frees it with a different order, the compound page information
will not be properly initialized.  To detect this problem,
compound_order(page) and the order argument are compared, but this is not
checked when the order argument is zero.  That error should be checked
regardless of the order.

Link: https://lkml.kernel.org/r/20231023083217.1866451-1-hyesoo.yu@samsung.com


Signed-off-by: default avatarHyesoo Yu <hyesoo.yu@samsung.com>
Reviewed-by: default avatarVishal Moola (Oracle) <vishal.moola@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent be16dd76
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment