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

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

parents da51139d 77d1f4f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -476,7 +476,8 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
		if (PageCompound(page)) {
		if (PageCompound(page)) {
			const unsigned int order = compound_order(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;
				blockpfn += (1UL << order) - 1;
				cursor += (1UL << order) - 1;
				cursor += (1UL << order) - 1;
			}
			}