From: Felix Kuehling Date: Thu, 18 Jan 2018 04:52:03 +0000 (-0500) Subject: drm/ttm: Don't add swapped BOs to swap-LRU list X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3176b3a9ebc2598e8efb31c3fc89634cc202a862;p=pandora-kernel.git drm/ttm: Don't add swapped BOs to swap-LRU list commit fd5002d6a3c602664b07668a24df4ef7a43bf078 upstream. A BO that's already swapped would be added back to the swap-LRU list for example if its validation failed under high memory pressure. This could later lead to swapping it out again and leaking previous swap storage. This commit adds a condition to prevent that from happening. v2: Check page_flags instead of swap_storage Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher [bwh: Backported to 3.2: We aren't checking for TTM_PAGE_FLAG_SG here as that's not defined] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed