[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d580094.f274c.17277fc124e.Coremail.dinghao.liu@zju.edu.cn>
Date: Wed, 3 Jun 2020 10:21:47 +0800 (GMT+08:00)
From: dinghao.liu@....edu.cn
To: "Dan Carpenter" <dan.carpenter@...cle.com>
Cc: "Markus Elfring" <Markus.Elfring@....de>,
dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
"Ben Skeggs" <bskeggs@...hat.com>,
"David Airlie" <airlied@...ux.ie>, "Kangjie Lu" <kjlu@....edu>
Subject: Re: Re: [PATCH] drm/nouveau/clk/gm20b: Fix memory leak in
gm20b_clk_new()
> On Tue, Jun 02, 2020 at 01:10:34PM +0200, Markus Elfring wrote:
> > > The original patch was basically fine.
> >
> > I propose to reconsider the interpretation of the software situation once more.
> >
> > * Should the allocated clock object be kept usable even after
> > a successful return from this function?
>
> Heh. You're right. The patch is freeing "clk" on the success path so
> that doesn't work.
>
Ben has explained this problem:
https://lore.kernel.org/patchwork/patch/1249592/
Since the caller will check "pclk" on failure, we don't need to free
"clk" in gm20b_clk_new() and I think this patch is no longer needed.
Regards,
Dinghao
Powered by blists - more mailing lists