public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests
@ 2015-01-29 16:55 Nick Hoath
  2015-01-30  9:01 ` Mika Kuoppala
  2015-01-31 22:42 ` shuang.he
  0 siblings, 2 replies; 6+ messages in thread
From: Nick Hoath @ 2015-01-29 16:55 UTC (permalink / raw)
  To: intel-gfx

Remove request from list before unreferencing it, in case it's actually
the only reference. (Found by Tvrtko Ursulin)

Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 70e449b..a94346f 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -732,8 +732,8 @@ void intel_execlists_retire_requests(struct intel_engine_cs *ring)
 			intel_lr_context_unpin(ring, ctx);
 		intel_runtime_pm_put(dev_priv);
 		i915_gem_context_unreference(ctx);
-		i915_gem_request_unreference(req);
 		list_del(&req->execlist_link);
+		i915_gem_request_unreference(req);
 	}
 }
 
-- 
2.1.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests
  2015-01-29 16:55 [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests Nick Hoath
@ 2015-01-30  9:01 ` Mika Kuoppala
  2015-01-30 16:33   ` Daniel Vetter
  2015-01-31 22:42 ` shuang.he
  1 sibling, 1 reply; 6+ messages in thread
From: Mika Kuoppala @ 2015-01-30  9:01 UTC (permalink / raw)
  To: Nick Hoath, intel-gfx

Nick Hoath <nicholas.hoath@intel.com> writes:

> Remove request from list before unreferencing it, in case it's actually
> the only reference. (Found by Tvrtko Ursulin)
>
> Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 70e449b..a94346f 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -732,8 +732,8 @@ void intel_execlists_retire_requests(struct intel_engine_cs *ring)
>  			intel_lr_context_unpin(ring, ctx);
>  		intel_runtime_pm_put(dev_priv);
>  		i915_gem_context_unreference(ctx);
> -		i915_gem_request_unreference(req);
>  		list_del(&req->execlist_link);
> +		i915_gem_request_unreference(req);
>  	}
>  }
>  
> -- 
> 2.1.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests
  2015-01-30  9:01 ` Mika Kuoppala
@ 2015-01-30 16:33   ` Daniel Vetter
  2015-01-30 16:45     ` Nick Hoath
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2015-01-30 16:33 UTC (permalink / raw)
  To: Mika Kuoppala; +Cc: intel-gfx

On Fri, Jan 30, 2015 at 11:01:30AM +0200, Mika Kuoppala wrote:
> Nick Hoath <nicholas.hoath@intel.com> writes:
> 
> > Remove request from list before unreferencing it, in case it's actually
> > the only reference. (Found by Tvrtko Ursulin)
> >
> > Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>

Do we have a Bugzilla: or similar report? Also when fixing a regression
please dig out the offending original commit from the history. Though in
this case here I'm not sure whether it is one ...

Please reply with this information so that I can amend the commit message.

> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests
  2015-01-30 16:33   ` Daniel Vetter
@ 2015-01-30 16:45     ` Nick Hoath
  2015-01-30 18:37       ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Hoath @ 2015-01-30 16:45 UTC (permalink / raw)
  To: Daniel Vetter, Mika Kuoppala; +Cc: intel-gfx@lists.freedesktop.org

On 30/01/2015 16:33, Daniel Vetter wrote:
> On Fri, Jan 30, 2015 at 11:01:30AM +0200, Mika Kuoppala wrote:
>> Nick Hoath <nicholas.hoath@intel.com> writes:
>>
>>> Remove request from list before unreferencing it, in case it's actually
>>> the only reference. (Found by Tvrtko Ursulin)
>>>
>>> Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>
>
> Do we have a Bugzilla: or similar report? Also when fixing a regression
There's no bug report.
> please dig out the offending original commit from the history. Though in
> this case here I'm not sure whether it is one ...
I guess the closest thing to an offending commit is 
6d3d8274bc45de4babb62d64562d92af984dd238 drm/i915: Subsume 
intel_ctx_submit_request in to drm_i915_gem_request
>
> Please reply with this information so that I can amend the commit message.
>
>> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
>
> Queued for -next, thanks for the patch.
> -Daniel
>

Cheers,
Nick
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests
  2015-01-30 16:45     ` Nick Hoath
@ 2015-01-30 18:37       ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2015-01-30 18:37 UTC (permalink / raw)
  To: Nick Hoath; +Cc: intel-gfx@lists.freedesktop.org

On Fri, Jan 30, 2015 at 5:45 PM, Nick Hoath <nicholas.hoath@intel.com> wrote:
> On 30/01/2015 16:33, Daniel Vetter wrote:
>>
>> On Fri, Jan 30, 2015 at 11:01:30AM +0200, Mika Kuoppala wrote:
>>>
>>> Nick Hoath <nicholas.hoath@intel.com> writes:
>>>
>>>> Remove request from list before unreferencing it, in case it's actually
>>>> the only reference. (Found by Tvrtko Ursulin)
>>>>
>>>> Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>
>>
>>
>> Do we have a Bugzilla: or similar report? Also when fixing a regression
>
> There's no bug report.

Hm, would have expected one ... maybe just stuck somewhere.

>> please dig out the offending original commit from the history. Though in
>> this case here I'm not sure whether it is one ...
>
> I guess the closest thing to an offending commit is
> 6d3d8274bc45de4babb62d64562d92af984dd238 drm/i915: Subsume
> intel_ctx_submit_request in to drm_i915_gem_request

Thanks a lot, added.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests
  2015-01-29 16:55 [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests Nick Hoath
  2015-01-30  9:01 ` Mika Kuoppala
@ 2015-01-31 22:42 ` shuang.he
  1 sibling, 0 replies; 6+ messages in thread
From: shuang.he @ 2015-01-31 22:42 UTC (permalink / raw)
  To: shuang.he, ethan.gao, intel-gfx, nicholas.hoath

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 5684
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                                  353/353              353/353
ILK                                  200/200              200/200
SNB                                  400/422              400/422
IVB              +2                 485/487              487/487
BYT                                  296/296              296/296
HSW              +1                 507/508              508/508
BDW                 -2              401/402              399/402
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 IVB  igt_gem_pwrite_pread_snooped-pwrite-blt-cpu_mmap-performance      DMESG_WARN(6, M34M21)PASS(8, M4M34)      PASS(1, M4)
 IVB  igt_gem_storedw_batches_loop_normal      DMESG_WARN(5, M34M4)PASS(15, M34M4M21)      PASS(1, M4)
 HSW  igt_gem_pwrite_pread_snooped-pwrite-blt-cpu_mmap-performance      DMESG_WARN(1, M40)PASS(18, M40M20)      PASS(1, M20)
 BDW  igt_gem_pwrite_pread_display-pwrite-blt-gtt_mmap-performance      DMESG_WARN(4, M28)PASS(2, M30)      DMESG_WARN(1, M28)
*BDW  igt_gem_pwrite_pread_uncached-pwrite-blt-gtt_mmap-performance      PASS(6, M30M28)      DMESG_WARN(1, M28)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-31 22:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 16:55 [PATCH] drm/i915: Fix a use-after-free in intel_execlists_retire_requests Nick Hoath
2015-01-30  9:01 ` Mika Kuoppala
2015-01-30 16:33   ` Daniel Vetter
2015-01-30 16:45     ` Nick Hoath
2015-01-30 18:37       ` Daniel Vetter
2015-01-31 22:42 ` shuang.he

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox