Hi,
On Mon, Jun 23, 2025 at 2:07 AM Liviu Dudau <liviu.du...@arm.com> wrote: > > On Mon, Jun 23, 2025 at 08:21:22AM +0200, Boris Brezillon wrote: > > On Fri, 20 Jun 2025 16:50:51 -0700 > > Chia-I Wu <olva...@gmail.com> wrote: > > > > > We would like to access panthor_file from panthor_group on gpu errors. > > > Because panthour_group can outlive drm_file, add refcount to > > > panthor_file to ensure its lifetime. > > > > I'm not a huge fan of refcounting panthor_file because people tend to > > put resource they expect to be released when the last handle goes away, > > and if we don't refcount these sub-resources they might live longer > > than they are meant to. Also not a huge fan of the circular referencing > > that exists between file and groups after this change. > > > > How about we move the process info to a sub-object that's refcounted > > and let both panthor_file and panthor_group take a ref on this object > > instead? > > I agree with Boris on this. One alternative is to put the pid and comm in > the panthor_group struct as panthor_file makes no use of the fields. I took this suggestion in v2 because, when the task that opened the node differs from the task that created the group, we are more interested in the latter.