[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <119b7d8c-b164-ef23-84cc-4904d34ac023@web.de>
Date: Sat, 20 Jun 2020 14:37:28 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Bernard Zhao <bernard@...o.com>, opensource.kernel@...o.com,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
Felix Kühling <Felix.Kuehling@....com>,
Christian König <christian.koenig@....com>,
Alex Deucher <alexander.deucher@....com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>
Subject: Re: [PATCH v3] drm/amd: Fix memory leak according to error branch
> 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
Powered by blists - more mailing lists