aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Thierry <[email protected]>2015-06-25 12:59:38 +0100
committerJani Nikula <[email protected]>2015-06-26 12:40:35 +0300
commit00245266b4be4fbe989ee073663f56716da6c1f3 (patch)
tree2a24caaae35ffc13a67d240b00d4007b37c8190b
parentac88cd738425e04dbed3706621cf613a00708834 (diff)
drm/i915/ppgtt: Break loop in gen8_ppgtt_clear_range failure path
If for some reason [1], the page directory/table does not exist, clear_range would end up in an infinite while loop. Introduced by commit 06fda602dbca ("drm/i915: Create page table allocators"). [1] This is already being addressed in one of Mika's patches: http://mid.gmane.org/[email protected] Cc: Mika Kuoppala <[email protected]> Cc: [email protected] Reported-by: John Harrison <[email protected]> Signed-off-by: Michel Thierry <[email protected]> Reviewed-by: Mika Kuoppala <[email protected]> Signed-off-by: Jani Nikula <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 619dad1b2386..9daa2883ac18 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -516,17 +516,17 @@ static void gen8_ppgtt_clear_range(struct i915_address_space *vm,
struct page *page_table;
if (WARN_ON(!ppgtt->pdp.page_directory[pdpe]))
- continue;
+ break;
pd = ppgtt->pdp.page_directory[pdpe];
if (WARN_ON(!pd->page_table[pde]))
- continue;
+ break;
pt = pd->page_table[pde];
if (WARN_ON(!pt->page))
- continue;
+ break;
page_table = pt->page;