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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250117-bettong-of-radical-prestige-0d81a5@houat>
Date: Fri, 17 Jan 2025 15:37:49 +0100
From: Maxime Ripard <mripard@...nel.org>
To: Sasha Finkelstein <fnkl.kernel@...il.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>, 
	Hector Martin <marcan@...can.st>, Sven Peter <sven@...npeter.dev>, 
	Alyssa Rosenzweig <alyssa@...enzweig.io>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, 
	Simona Vetter <simona@...ll.ch>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Neil Armstrong <neil.armstrong@...aro.org>, Jessica Zhang <quic_jesszhan@...cinc.com>, asahi@...ts.linux.dev, 
	linux-arm-kernel@...ts.infradead.org, dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Alyssa Ross <hi@...ssa.is>, Janne Grunau <j@...nau.net>
Subject: Re: [PATCH v4 2/5] drm: adp: Add Apple Display Pipe driver

On Fri, Jan 17, 2025 at 03:17:32PM +0100, Sasha Finkelstein wrote:
> On Fri, 17 Jan 2025 at 11:24, Maxime Ripard <mripard@...nel.org> wrote:
> > >
> > > I was thinking about using drmm_ here, as the DRM device is also created
> > > and destroyed each time. But I might be mistaken here.
> >
> > Ah, right, it makes sense then, thanks!
> > Maxime
> 
> Not sure i understand. The drm device is created in probe(), and is
> destroyed by devm.

Not really. The reference your driver has on the drm device is given up
by devm. It will be destroyed when the last app will close its fd to the
drm device file.

> I do not see a path where it can be created/destroyed without a trip
> via probe/remove, and so tying the lifetime of the bridge in question
> to devm seems correct?

And while someone has an opened fd, it can still call into the driver
through ioctls, so any KMS-facing resources need to be tied to the life
of the drm device, not its underlying device.

Maxime

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ