From: Greg Kroah-Hartman Date: Thu, 16 Jan 2020 06:30:16 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v4.14.166~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e001c144a8ca74c0b147e16b7b2a17778a5508c4;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch --- diff --git a/queue-4.19/drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch b/queue-4.19/drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch new file mode 100644 index 00000000000..8be5d808850 --- /dev/null +++ b/queue-4.19/drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch @@ -0,0 +1,46 @@ +From 453393369dc9806d2455151e329c599684762428 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= +Date: Wed, 10 Apr 2019 11:43:43 +0200 +Subject: drm/ttm: fix incrementing the page pointer for huge pages +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Christian König + +commit 453393369dc9806d2455151e329c599684762428 upstream. + +When we increment the counter we need to increment the pointer as well. + +Signed-off-by: Christian König +Fixes: e16858a7e6e7 drm/ttm: fix start page for huge page check in ttm_put_pages() +Reviewed-by: Michel Dänzer +Acked-by: Huang Rui +Signed-off-by: Alex Deucher +Cc: Zubin Mithra +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/ttm/ttm_page_alloc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c ++++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c +@@ -733,7 +733,7 @@ static void ttm_put_pages(struct page ** + if (!(flags & TTM_PAGE_FLAG_DMA32) && + (npages - i) >= HPAGE_PMD_NR) { + for (j = 1; j < HPAGE_PMD_NR; ++j) +- if (p++ != pages[i + j]) ++ if (++p != pages[i + j]) + break; + + if (j == HPAGE_PMD_NR) +@@ -768,7 +768,7 @@ static void ttm_put_pages(struct page ** + break; + + for (j = 1; j < HPAGE_PMD_NR; ++j) +- if (p++ != pages[i + j]) ++ if (++p != pages[i + j]) + break; + + if (j != HPAGE_PMD_NR) diff --git a/queue-4.19/drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch b/queue-4.19/drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch new file mode 100644 index 00000000000..46f943a6e60 --- /dev/null +++ b/queue-4.19/drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch @@ -0,0 +1,46 @@ +From ac1e516d5a4c56bf0cb4a3dfc0672f689131cfd4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= +Date: Tue, 2 Apr 2019 09:29:35 +0200 +Subject: drm/ttm: fix start page for huge page check in ttm_put_pages() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Christian König + +commit ac1e516d5a4c56bf0cb4a3dfc0672f689131cfd4 upstream. + +The first page entry is always the same with itself. + +Signed-off-by: Christian König +Reviewed-by: Michel Dänzer +Reviewed-by: Junwei Zhang +Reviewed-by: Huang Rui +Signed-off-by: Alex Deucher +Cc: Zubin Mithra +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/ttm/ttm_page_alloc.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c ++++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c +@@ -732,7 +732,7 @@ static void ttm_put_pages(struct page ** + #ifdef CONFIG_TRANSPARENT_HUGEPAGE + if (!(flags & TTM_PAGE_FLAG_DMA32) && + (npages - i) >= HPAGE_PMD_NR) { +- for (j = 0; j < HPAGE_PMD_NR; ++j) ++ for (j = 1; j < HPAGE_PMD_NR; ++j) + if (p++ != pages[i + j]) + break; + +@@ -767,7 +767,7 @@ static void ttm_put_pages(struct page ** + if (!p) + break; + +- for (j = 0; j < HPAGE_PMD_NR; ++j) ++ for (j = 1; j < HPAGE_PMD_NR; ++j) + if (p++ != pages[i + j]) + break; + diff --git a/queue-4.19/series b/queue-4.19/series index 1f491acd801..4530bceff81 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -29,3 +29,5 @@ s390-qeth-fix-false-reporting-of-vnic-char-config-failure.patch s390-qeth-fix-vnicc_is_in_use-if-rx_bcast-not-set.patch cifs-adjust-indentation-in-smb2_open_file.patch afs-fix-missing-cell-comparison-in-afs_test_super.patch +drm-ttm-fix-start-page-for-huge-page-check-in-ttm_put_pages.patch +drm-ttm-fix-incrementing-the-page-pointer-for-huge-pages.patch