[1/1] drm/ttm: Fix accounting error when fail to get pages for pool

Submitted by Yu, Xiangliang on Aug. 16, 2017, 8:28 a.m.


Message ID BY2PR1201MB0935DB65B882D9D3B69A065AEB820@BY2PR1201MB0935.namprd12.prod.outlook.com
State New
Headers show
Series "Series without cover letter" ( rev: 3 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Yu, Xiangliang Aug. 16, 2017, 8:28 a.m.
Ok, CC stable.

From: Christian König [mailto:deathsimple@vodafone.de]
Sent: Wednesday, August 16, 2017 3:55 PM
To: Liu, Monk <Monk.Liu@amd.com>; Yu, Xiangliang <Xiangliang.Yu@amd.com>; akpm@linux-foundation.org; labbott@redhat.com; dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/ttm: Fix accounting error when fail to get pages for pool

CC stable?

Reviewed-by: Christian König <christian.koenig@amd.com><mailto:christian.koenig@amd.com>

Am 16.08.2017 um 09:25 schrieb Liu, Monk:

Reviewed-by: Monk Liu <monk.liu@amd.com><mailto:monk.liu@amd.com>

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index eeddc1e..8715998 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -615,7 +615,7 @@  static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,
                 } else {
                         pr_err("Failed to fill pool (%p)\n", pool);
                         /* If we have any pages left put them to the pool. */
-                       list_for_each_entry(p, &pool->list, lru) {
+                       list_for_each_entry(p, &new_pages, lru) {
                         list_splice(&new_pages, &pool->list);