[Intel-gfx] [PATCH] drm/i915/gt: Fix memory leaks in per-gt sysfs

Andi Shyti andi.shyti at linux.intel.com
Tue May 10 05:47:57 UTC 2022


Hi Ashutosh,

On Wed, Apr 27, 2022 at 01:38:33PM -0700, Ashutosh Dixit wrote:
> All kmalloc'd kobjects need a kobject_put() to free memory. For example in
> previous code, kobj_gt_release() never gets called. The requirement of
> kobject_put() now results in a slightly different code organization.
> 
> v2: s/gtn/gt/ (Andi)
> 
> Cc: Andi Shyti <andi.shyti at intel.com>
> Cc: Andrzej Hajda <andrzej.hajda at intel.com>
> Fixes: b770bcfae9ad ("drm/i915/gt: create per-tile sysfs interface")
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

I'm still not convinced this patch is 100% correct, but I think
it's better thank what it was and it's not addressing Andrzej's
comment.

As of now, though, I'm not able to think of a better way of doing
it and if Andrzej doesn't have a better solution I would just
tag it:

Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com>

As soon as I will have some time I will test it to proof
Andrzej's concern.

Thanks for taking care of this,
Andi


More information about the Intel-gfx mailing list