Unverified Commit 86893ebd authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14995 mm/compaction: fix UBSAN shift-out-of-bounds warning

parents 630e9af0 8cbbcf09
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -599,7 +599,8 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
		if (PageCompound(page)) {
			const unsigned int order = compound_order(page);

			if (blockpfn + (1UL << order) <= end_pfn) {
			if (likely(order < MAX_ORDER) &&
			    (blockpfn + (1UL << order) <= end_pfn)) {
				blockpfn += (1UL << order) - 1;
				cursor += (1UL << order) - 1;
			}