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: <ZjvY-B_VG0uBTiJO@intel.com>
Date: Wed, 8 May 2024 22:56:40 +0300
From: Ville Syrjälä <ville.syrjala@...ux.intel.com>
To: Mario Limonciello <mario.limonciello@....com>
Cc: dri-devel@...ts.freedesktop.org,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
	linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
	Aurabindo Pillai <aurabindo.pillai@....com>,
	Daniel Wheeler <daniel.wheeler@....com>,
	Fangzhi Zuo <jerry.zuo@....com>,
	Tyler Schneider <tyler.schneider@....com>
Subject: Re: [PATCH 1/2] drm: Allow mode object properties to be added after
 a device is registered

On Wed, May 08, 2024 at 02:43:07PM -0500, Mario Limonciello wrote:
> When the colorspace property is registered on MST devices there is
> no `obj_free_cb` callback for it in drm_mode_object_add().
> 
> Don't show a warning trace for __drm_mode_object_add() calls for
> DRM_MODE_OBJECT_PROPERTY.

You need to create the property ahead of time. See eg.
commit 1b9bd09630d4 ("drm/i915: Do not create a new max_bpc prop for MST
connectors")

> 
> Reported-and-tested-by: Tyler Schneider <tyler.schneider@....com>
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3353
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
>  drivers/gpu/drm/drm_mode_object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
> index 0e8355063eee..b077547a2db4 100644
> --- a/drivers/gpu/drm/drm_mode_object.c
> +++ b/drivers/gpu/drm/drm_mode_object.c
> @@ -42,7 +42,7 @@ int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj,
>  {
>  	int ret;
>  
> -	WARN_ON(!dev->driver->load && dev->registered && !obj_free_cb);
> +	WARN_ON(!dev->driver->load && dev->registered && !obj_free_cb && obj_type != DRM_MODE_OBJECT_PROPERTY);
>  
>  	mutex_lock(&dev->mode_config.idr_mutex);
>  	ret = idr_alloc(&dev->mode_config.object_idr, register_obj ? obj : NULL,
> -- 
> 2.43.0

-- 
Ville Syrjälä
Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ