[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BYAPR21MB1270FE45040F31DC71C0F5E6BF359@BYAPR21MB1270.namprd21.prod.outlook.com>
Date: Thu, 10 Jun 2021 20:03:23 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: Dhiraj Shah <find.dhiraj@...il.com>
CC: KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Shachar Raindel <shacharr@...rosoft.com>,
Colin Ian King <colin.king@...onical.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] function mana_hwc_create_wq leaks memory
> From: Dhiraj Shah <find.dhiraj@...il.com>
> Sent: Thursday, June 10, 2021 12:53 PM
> ...
> Hi Dexuan,
>
> Thanks for the feedback.
>
> You are right saying ‘mana_hwc_destroy_wq' free’s up the queue.
>
> However for example if function 'mana_hwc_alloc_dma_buf' fails it will goto
> ‘out' and call ‘mana_hwc_destroy_wq', the value 'hwc_wq->gdma_wq' is
> still not assigned at this point. In the ‘mana_hwc_destroy_wq' function i see
At this point, hwc_wq->gdma_wq stays with its default value NULL.
> it checks for 'hwc_wq->gdma_wq' before calling, ‘mana_gd_destroy_queue',
> which makes me think queue is still not freed.
IMO the current code is not buggy, though I admit it's not very readable. :-)
If you're interested, you're welcome to help make it more readable. I'll also
try to make some time on this.
Thanks,
Dexuan
Powered by blists - more mailing lists