linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/armada: Fix a potential double free in an error handling path
@ 2021-12-26 16:34 Christophe JAILLET
  2023-04-11 18:09 ` Christophe JAILLET
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-12-26 16:34 UTC (permalink / raw)
  To: linux, airlied, daniel, airlied
  Cc: dri-devel, linux-kernel, kernel-janitors, Christophe JAILLET

'priv' is a managed resource, so there is no need to free it explicitly or
there will be a double free().

Fixes: 90ad200b4cbc ("drm/armada: Use devm_drm_dev_alloc")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/gpu/drm/armada/armada_drv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
index 8e3e98f13db4..54168134d9b9 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
@@ -99,7 +99,6 @@ static int armada_drm_bind(struct device *dev)
 	if (ret) {
 		dev_err(dev, "[" DRM_NAME ":%s] can't kick out simple-fb: %d\n",
 			__func__, ret);
-		kfree(priv);
 		return ret;
 	}
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/armada: Fix a potential double free in an error handling path
  2021-12-26 16:34 [PATCH] drm/armada: Fix a potential double free in an error handling path Christophe JAILLET
@ 2023-04-11 18:09 ` Christophe JAILLET
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe JAILLET @ 2023-04-11 18:09 UTC (permalink / raw)
  To: linux, daniel, David Airlie; +Cc: dri-devel, linux-kernel, kernel-janitors

Le 26/12/2021 à 17:34, Christophe JAILLET a écrit :
> 'priv' is a managed resource, so there is no need to free it explicitly or
> there will be a double free().
> 
> Fixes: 90ad200b4cbc ("drm/armada: Use devm_drm_dev_alloc")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   drivers/gpu/drm/armada/armada_drv.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
> index 8e3e98f13db4..54168134d9b9 100644
> --- a/drivers/gpu/drm/armada/armada_drv.c
> +++ b/drivers/gpu/drm/armada/armada_drv.c
> @@ -99,7 +99,6 @@ static int armada_drm_bind(struct device *dev)
>   	if (ret) {
>   		dev_err(dev, "[" DRM_NAME ":%s] can't kick out simple-fb: %d\n",
>   			__func__, ret);
> -		kfree(priv);
>   		return ret;
>   	}
>   

Hi,

polite reminder. (I've updated the mails according to the output of 
get_maintainer.pl)

The patch still LGTM and should apply cleanly.

CJ

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-11 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-26 16:34 [PATCH] drm/armada: Fix a potential double free in an error handling path Christophe JAILLET
2023-04-11 18:09 ` Christophe JAILLET

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).