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]
Date:   Mon, 10 Oct 2016 11:22:37 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     airlied@...ux.ie, daniel@...ll.ch, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] drm: Release resources with a safer function

On Fri, Oct 07, 2016 at 09:27:41AM +0200, Christophe JAILLET wrote:
> We should use 'ida_simple_remove()' instead of 'ida_remove()' when freeing
> resources allocated with 'ida_simple_get()'.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Applied to drm-misc, thanks.
-Daniel

> ---
>  drivers/gpu/drm/drm_connector.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 2e7430283043..2db7fb510b6c 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -341,11 +341,11 @@ void drm_connector_cleanup(struct drm_connector *connector)
>  	list_for_each_entry_safe(mode, t, &connector->modes, head)
>  		drm_mode_remove(connector, mode);
>  
> -	ida_remove(&drm_connector_enum_list[connector->connector_type].ida,
> -		   connector->connector_type_id);
> +	ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida,
> +			  connector->connector_type_id);
>  
> -	ida_remove(&dev->mode_config.connector_ida,
> -		   connector->index);
> +	ida_simple_remove(&dev->mode_config.connector_ida,
> +			  connector->index);
>  
>  	kfree(connector->display_info.bus_formats);
>  	drm_mode_object_unregister(dev, &connector->base);
> -- 
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ