diff mbox series

drm/i915: Enable refcount debugging for default debug levels

Message ID 20190613122842.4840-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series drm/i915: Enable refcount debugging for default debug levels | expand

Commit Message

Chris Wilson June 13, 2019, 12:28 p.m. UTC
refcount_t is our first line of defence against use-after-free, so let's
enable it for debugging.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)

Comments

Rodrigo Vivi June 13, 2019, 12:46 p.m. UTC | #1
On Thu, Jun 13, 2019 at 01:28:42PM +0100, Chris Wilson wrote:
> refcount_t is our first line of defence against use-after-free, so let's
> enable it for debugging.

It seems a nice thing to have on debug by default and they promise no
performance impact.

Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Well, I hope our CI doesn't complain, but if it does we can remove later.
anyway,
Cc: Martin
Cc: Tomi
Cc: Arek

> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/Kconfig.debug | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index 09aa0f4c8bf1..8d922bb4d953 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -21,6 +21,7 @@ config DRM_I915_DEBUG
>          depends on DRM_I915
>          select DEBUG_FS
>          select PREEMPT_COUNT
> +        select REFCOUNT_FULL
>          select I2C_CHARDEV
>          select STACKDEPOT
>          select DRM_DP_AUX_CHARDEV
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Sarvela, Tomi P June 13, 2019, 12:57 p.m. UTC | #2
On 6/13/19 3:46 PM, Rodrigo Vivi wrote:
> On Thu, Jun 13, 2019 at 01:28:42PM +0100, Chris Wilson wrote:
>> refcount_t is our first line of defence against use-after-free, so let's
>> enable it for debugging.
> 
> It seems a nice thing to have on debug by default and they promise no
> performance impact.
> 
> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> Well, I hope our CI doesn't complain, but if it does we can remove later.
> anyway,
> Cc: Martin
> Cc: Tomi
> Cc: Arek

This change will be seen in forced build CI_DRM_6260.

Tomi

>>
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> ---
>>   drivers/gpu/drm/i915/Kconfig.debug | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
>> index 09aa0f4c8bf1..8d922bb4d953 100644
>> --- a/drivers/gpu/drm/i915/Kconfig.debug
>> +++ b/drivers/gpu/drm/i915/Kconfig.debug
>> @@ -21,6 +21,7 @@ config DRM_I915_DEBUG
>>           depends on DRM_I915
>>           select DEBUG_FS
>>           select PREEMPT_COUNT
>> +        select REFCOUNT_FULL
>>           select I2C_CHARDEV
>>           select STACKDEPOT
>>           select DRM_DP_AUX_CHARDEV
>> -- 
>> 2.20.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
index 09aa0f4c8bf1..8d922bb4d953 100644
--- a/drivers/gpu/drm/i915/Kconfig.debug
+++ b/drivers/gpu/drm/i915/Kconfig.debug
@@ -21,6 +21,7 @@  config DRM_I915_DEBUG
         depends on DRM_I915
         select DEBUG_FS
         select PREEMPT_COUNT
+        select REFCOUNT_FULL
         select I2C_CHARDEV
         select STACKDEPOT
         select DRM_DP_AUX_CHARDEV