Unverified Commit 307e614f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

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

parents 37dafafe 390efa00
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -650,7 +650,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 ((order <= MAX_PAGE_ORDER) &&
			    (blockpfn + (1UL << order) <= end_pfn)) {
				blockpfn += (1UL << order) - 1;
				page += (1UL << order) - 1;
				nr_scanned += (1UL << order) - 1;