Skip to contentSkip to conversation

tools/testing/scatterlist: Fix overflow of max segment size

PATCH New Leon Romanovsky 1 participant 1 message Jan 26, 2021 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/testing/scatterlist: Fix overflow of max segment size

From: Maor Gottlieb <[email protected]>

Because SCATTERLIST_MAX_SEGMENT was removed and replaced with UINT_MAX, the test overflows the max_sgement variable. Remove this case.

Fixes 7a60c2dd0f57 ("drm: Remove SCATTERLIST_MAX_SEGMENT")
---
 tools/testing/scatterlist/main.c | 1 -
 1 file changed, 1 deletion(-)
tools/testing/scatterlist/main.c +0 -1
index 71c960dcd8a4..652254754b4c 100644
@@ -55,7 +55,6 @@ int main(void)
 	struct test *test, tests[] = {
 		{ -EINVAL, 1, pfn(0), NULL, PAGE_SIZE, 0, 1 },
 		{ 0, 1, pfn(0), NULL, PAGE_SIZE, PAGE_SIZE + 1, 1 },
-		{ 0, 1, pfn(0), NULL, PAGE_SIZE, sgmax + 1, 1 },
 		{ 0, 1, pfn(0), NULL, PAGE_SIZE, sgmax, 1 },
 		{ 0, 1, pfn(0), NULL, 1, sgmax, 1 },
 		{ 0, 2, pfn(0, 1), NULL, 2 * PAGE_SIZE, sgmax, 1 },

--
2.29.2