drm/i915/ppgtt: Break loop in gen8_ppgtt_clear_range failure path
Subsystems (2)
PATCH 1/1 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]
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +3 -3
@@ -517,17 +517,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;
Signature · 6 lines
2.4.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Michel Thierry
If for some reason [1], the page directory/table does not exist,
clear_rangewould 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]
We need both.
Quoted 3 lines
Cc Mika Kuoppala <[email protected]>Reported-by John Harrison <[email protected]>Signed-off-by Michel Thierry <[email protected]>
Quoted 31 lines
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_gem_gtt.c +3
-3@@ -517,17 +517,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;Signature · 1 line
2.4.4
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Mika Kuoppala
Quoted 8 lines · Michel Thierry
If for some reason [1], the page directory/table does not exist,
clear_rangewould 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]
Quoted 7 lines
We need both.
Quoted 3 lines
Cc Mika Kuoppala <[email protected]>Reported-by John Harrison <[email protected]>Signed-off-by Michel Thierry <[email protected]>Reviewed-by Mika Kuoppala <[email protected]>
Since the offending commit is in 4.1 this is for Jani.
Cheers, Daniel
Quoted 36 lines
Quoted 32 lines
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_gem_gtt.c +3
-3@@ -517,17 +517,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;Signature · 1 line
2.4.4_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 18 lines · Daniel Vetter
Quoted 17 lines · Mika Kuoppala
Quoted 8 lines · Michel Thierry
If for some reason [1], the page directory/table does not exist,
clear_rangewould 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]We need both.
Quoted 3 lines
Cc Mika Kuoppala <[email protected]>Reported-by John Harrison <[email protected]>Signed-off-by Michel Thierry <[email protected]>
Quoted 5 lines
Quoted 1 line
Reviewed-by Mika Kuoppala <[email protected]>Since the offending commit is in 4.1 this is for Jani.
Pushed to drm-intel-next-fixes, thanks for the patch and review. Fingers crossed, I hope I didn't screw up the conflict resolution for nightly...
BR,
Jani.
Quoted 44 lines
Cheers, Daniel
Quoted 36 lines
Quoted 32 lines
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/i915_gem_gtt.c +3
-3@@ -517,17 +517,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;Signature · 1 line
2.4.4_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx