lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250610-wildcat-of-marvelous-modernism-e4ce27@houat>
Date: Tue, 10 Jun 2025 17:41:59 +0200
From: Maxime Ripard <mripard@...nel.org>
To: Anusha Srivatsa <asrivats@...hat.com>
Cc: Neil Armstrong <neil.armstrong@...aro.org>, 
	Jessica Zhang <quic_jesszhan@...cinc.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, 
	Simona Vetter <simona@...ll.ch>, Inki Dae <inki.dae@...sung.com>, 
	Jagan Teki <jagan@...rulasolutions.com>, Marek Szyprowski <m.szyprowski@...sung.com>, 
	Andrzej Hajda <andrzej.hajda@...el.com>, Robert Foss <rfoss@...nel.org>, 
	Laurent Pinchart <Laurent.pinchart@...asonboard.com>, Jonas Karlman <jonas@...boo.se>, 
	Jernej Skrabec <jernej.skrabec@...il.com>, Chen-Yu Tsai <wens@...e.org>, 
	Samuel Holland <samuel@...lland.org>, Seung-Woo Kim <sw0312.kim@...sung.com>, 
	Kyungmin Park <kyungmin.park@...sung.com>, Krzysztof Kozlowski <krzk@...nel.org>, 
	Alim Akhtar <alim.akhtar@...sung.com>, dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev, linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 2/4] drm/panel/samsung-dsicm: Keep up with refcounting

On Mon, Jun 09, 2025 at 10:45:35AM -0500, Anusha Srivatsa wrote:
> On Fri, Jun 6, 2025 at 7:03 AM Maxime Ripard <mripard@...nel.org> wrote:
> 
> > On Wed, Jun 04, 2025 at 10:45:11PM -0500, Anusha Srivatsa wrote:
> > > Put the panel reference back when driver is no
> > > longer using it.
> > >
> > > Signed-off-by: Anusha Srivatsa <asrivats@...hat.com>
> > > ---
> > >  drivers/gpu/drm/bridge/samsung-dsim.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c
> > b/drivers/gpu/drm/bridge/samsung-dsim.c
> > > index
> > 0014c497e3fe7d8349a119dbdda30d65d816cccf..3667855ff0d6d1b608c579573de657af7fd14388
> > 100644
> > > --- a/drivers/gpu/drm/bridge/samsung-dsim.c
> > > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
> > > @@ -1748,6 +1748,7 @@ static int samsung_dsim_host_attach(struct
> > mipi_dsi_host *host,
> > >                       dsi->out_bridge = ERR_PTR(-EINVAL);
> > >       }
> > >
> > > +     drm_panel_put(panel);
> > >       of_node_put(remote);
> > >
> > >       if (IS_ERR(dsi->out_bridge)) {
> >
> > Explaining in your commit log why you think it's a good idea to put it
> > there would be really nice. In particular, it looks super odd to me that
> > you would put the panel reference in attach.
> >
> > Also, your patch doesn't work, and you have a reference inbalance. You
> > have one taken by the panel driver, put in remove. You have one in
> > drm_panel_add, put in drm_panel_remove. Which reference do you put here?
> >
> > This applies to your other patches too.
>
> Yes, I should get the ref in of_drm_find_panel() to put it here. With
> that said, all callers of of_drm_find_panel() should be converted
> instead of the small batch that this series addresses.

Then do the of_drm_find_panel() conversion before, because here you will
free up the structure despite some callers still having a reference on
it.

Maxime

Download attachment "signature.asc" of type "application/pgp-signature" (270 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ