]> git.baikalelectronics.ru Git - kernel.git/commit
mm: page_alloc: validate buddy before check its migratetype.
authorZi Yan <ziy@nvidia.com>
Wed, 30 Mar 2022 22:45:43 +0000 (15:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Mar 2022 22:45:43 +0000 (15:45 -0700)
commitbae194529b886f3759e722cc090a03587ec335ab
tree0c18b1f5d46494dab9cd643bd303b7cbc4991a99
parent2c3ad8c0319b5f9a97544a2f35fcadfd1b8b17a3
mm: page_alloc: validate buddy before check its migratetype.

Whenever a buddy page is found, page_is_buddy() should be called to
check its validity.  Add the missing check during pageblock merge check.

Fixes: 43dd298e4070 ("mm: page_alloc: avoid merging non-fallbackable pageblocks with others")
Link: https://lore.kernel.org/all/20220330154208.71aca532@gandalf.local.home/
Reported-and-tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c