* Re: [PATCH v3] drm/amd: Fix memory leak according to error branch
@ 2020-06-20 12:37 Markus Elfring
2020-06-20 13:21 ` Julia Lawall
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2020-06-20 12:37 UTC (permalink / raw)
To: Bernard Zhao, opensource.kernel, amd-gfx, dri-devel
Cc: kernel-janitors, linux-kernel, Felix Kühling,
Christian König, Alex Deucher, David Airlie, Daniel Vetter
> The function kobject_init_and_add alloc memory like:
> kobject_init_and_add->kobject_add_varg->kobject_set_name_vargs
> ->kvasprintf_const->kstrdup_const->kstrdup->kmalloc_track_caller
> ->kmalloc_slab, in err branch this memory not free. If use
> kmemleak, this path maybe catched.
> These changes are to add kobject_put in kobject_init_and_add
> failed branch, fix potential memleak.
…
> Changes since V2:
> *remove duplicate kobject_put in kfd_procfs_init.
Under which circumstances are going to improve this change description accordingly?
Would you like to add the tag “Fixes” to the commit message?
Regards,
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3] drm/amd: Fix memory leak according to error branch
2020-06-20 12:37 [PATCH v3] drm/amd: Fix memory leak according to error branch Markus Elfring
@ 2020-06-20 13:21 ` Julia Lawall
0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2020-06-20 13:21 UTC (permalink / raw)
To: Markus Elfring
Cc: Bernard Zhao, opensource.kernel, amd-gfx, dri-devel,
kernel-janitors, linux-kernel, Felix Kühling,
Christian König, Alex Deucher, David Airlie, Daniel Vetter
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
On Sat, 20 Jun 2020, Markus Elfring wrote:
> > The function kobject_init_and_add alloc memory like:
> > kobject_init_and_add->kobject_add_varg->kobject_set_name_vargs
> > ->kvasprintf_const->kstrdup_const->kstrdup->kmalloc_track_caller
> > ->kmalloc_slab, in err branch this memory not free. If use
> > kmemleak, this path maybe catched.
> > These changes are to add kobject_put in kobject_init_and_add
> > failed branch, fix potential memleak.
> …
> > Changes since V2:
> > *remove duplicate kobject_put in kfd_procfs_init.
>
> Under which circumstances are going to improve this change description accordingly?
Bernard, please update the log message as well. The mail you sent was
much more clear, but mail just gets lost over time. The log message
itself should be improved.
julia
>
> Would you like to add the tag “Fixes” to the commit message?
>
> Regards,
> Markus
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-20 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-20 12:37 [PATCH v3] drm/amd: Fix memory leak according to error branch Markus Elfring
2020-06-20 13:21 ` Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox