[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfGHab7Oy5hhW+6rWxkcB5ZHif2hK7inbbdvfF-k0wX0A@mail.gmail.com>
Date: Sun, 14 Jun 2020 15:32:39 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Navid Emamdoost <navid.emamdoost@...il.com>
Cc: Eric Anholt <eric@...olt.net>, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Navid Emamdoost <emamd001@....edu>, wu000273@....edu,
Kangjie Lu <kjlu@....edu>, Stephen McCamant <smccaman@....edu>
Subject: Re: [PATCH] drm/vc4: fix ref count leak in vc4_dsi_encoder_enable
On Sun, Jun 14, 2020 at 9:55 AM Navid Emamdoost
<navid.emamdoost@...il.com> wrote:
>
> in vc4_dsi_encoder_enable, the call to pm_runtime_get_sync increments
> the counter even in case of failure, leading to incorrect
> ref count. In case of failure, decrement the ref count before returning.
...
> +out:
> + pm_runtime_put(dev);
Better to use pm_runtime_put_noidle() for error case.
And here is a change of semantics, i.e. before your patch there was no
put at all. How did you test this?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists