From: Maor Gottlieb <ma...@nvidia.com>

[ Upstream commit 96667052149da3855c4361925324b690c687152f ]

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")
Link: https://lore.kernel.org/r/20210125120527.836363-1-l...@kernel.org
Signed-off-by: Maor Gottlieb <ma...@nvidia.com>
Signed-off-by: Leon Romanovsky <leo...@nvidia.com>
Signed-off-by: Jason Gunthorpe <j...@nvidia.com>
Signed-off-by: Sasha Levin <sas...@kernel.org>
---
 tools/testing/scatterlist/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/testing/scatterlist/main.c b/tools/testing/scatterlist/main.c
index 71c960dcd8a42..652254754b4cb 100644
--- a/tools/testing/scatterlist/main.c
+++ b/tools/testing/scatterlist/main.c
@@ -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.27.0



Reply via email to