Re: [PATCH v2] drm/mxsfb: Switch to drmm_mode_config_init

Maxime Ripard
2023-11-28T08:28:00Z

[-- Attachment #1.1: Type: text/plain, Size: 1075 bytes --]

Hi,

On Mon, Nov 27, 2023 at 10:25:38PM +0100, Marek Vasut wrote:
> Switch from deprecated unmanaged drm_mode_config_init() to
> managed drmm_mode_config_init(). No functional change.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: NXP Linux Team <linux-imx@nxp.com>
> Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Stefan Agner <stefan@agner.ch>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-arm-kernel@lists.infradead.org

This is only somewhat related to that patch, but mksfb_drm_private is
allocated with devm and holds the planes, crtcs and encoders. This is
unsafe, leads to UAF, and should be converted to a drmm allocation too
(in another patch of course)

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]