* [PATCH] drm: of: Fix double-free bug
@ 2020-07-23 11:10 ` Biju Das
0 siblings, 0 replies; 6+ messages in thread
From: Biju Das @ 2020-07-23 11:10 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter
Cc: Biju Das, Laurent Pinchart, Fabrizio Castro, dri-devel,
Geert Uytterhoeven, Chris Paterson, Biju Das,
Prabhakar Mahadev Lad, linux-renesas-soc, stable
Fix double-free bug in the error path.
Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Cc: stable@vger.kernel.org
---
This patch is tested against drm-fixes and drm-next.
---
drivers/gpu/drm/drm_of.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index fdb05fb..ca04c34 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -331,10 +331,8 @@ static int drm_of_lvds_get_remote_pixels_type(
* configurations by passing the endpoints explicitly to
* drm_of_lvds_get_dual_link_pixel_order().
*/
- if (!current_pt || pixels_type != current_pt) {
- of_node_put(remote_port);
+ if (!current_pt || pixels_type != current_pt)
return -EINVAL;
- }
}
return pixels_type;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm: of: Fix double-free bug
@ 2020-07-23 11:10 ` Biju Das
0 siblings, 0 replies; 6+ messages in thread
From: Biju Das @ 2020-07-23 11:10 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter
Cc: Fabrizio Castro, Chris Paterson, Geert Uytterhoeven,
Prabhakar Mahadev Lad, dri-devel, Biju Das, linux-renesas-soc,
Laurent Pinchart, Biju Das, stable
Fix double-free bug in the error path.
Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Cc: stable@vger.kernel.org
---
This patch is tested against drm-fixes and drm-next.
---
drivers/gpu/drm/drm_of.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index fdb05fb..ca04c34 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -331,10 +331,8 @@ static int drm_of_lvds_get_remote_pixels_type(
* configurations by passing the endpoints explicitly to
* drm_of_lvds_get_dual_link_pixel_order().
*/
- if (!current_pt || pixels_type != current_pt) {
- of_node_put(remote_port);
+ if (!current_pt || pixels_type != current_pt)
return -EINVAL;
- }
}
return pixels_type;
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm: of: Fix double-free bug
2020-07-23 11:10 ` Biju Das
@ 2020-07-24 1:33 ` Laurent Pinchart
-1 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2020-07-24 1:33 UTC (permalink / raw)
To: Biju Das
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter, Fabrizio Castro, dri-devel,
Geert Uytterhoeven, Chris Paterson, Biju Das,
Prabhakar Mahadev Lad, linux-renesas-soc, stable
Hi Biju,
Thank you for the patch.
On Thu, Jul 23, 2020 at 12:10:54PM +0100, Biju Das wrote:
> Fix double-free bug in the error path.
>
> Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: stable@vger.kernel.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> This patch is tested against drm-fixes and drm-next.
> ---
> drivers/gpu/drm/drm_of.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
> index fdb05fb..ca04c34 100644
> --- a/drivers/gpu/drm/drm_of.c
> +++ b/drivers/gpu/drm/drm_of.c
> @@ -331,10 +331,8 @@ static int drm_of_lvds_get_remote_pixels_type(
> * configurations by passing the endpoints explicitly to
> * drm_of_lvds_get_dual_link_pixel_order().
> */
> - if (!current_pt || pixels_type != current_pt) {
> - of_node_put(remote_port);
> + if (!current_pt || pixels_type != current_pt)
> return -EINVAL;
> - }
> }
>
> return pixels_type;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm: of: Fix double-free bug
@ 2020-07-24 1:33 ` Laurent Pinchart
0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2020-07-24 1:33 UTC (permalink / raw)
To: Biju Das
Cc: Chris Paterson, Thomas Zimmermann, Geert Uytterhoeven,
David Airlie, dri-devel, Prabhakar Mahadev Lad, Fabrizio Castro,
Biju Das, linux-renesas-soc, stable
Hi Biju,
Thank you for the patch.
On Thu, Jul 23, 2020 at 12:10:54PM +0100, Biju Das wrote:
> Fix double-free bug in the error path.
>
> Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: stable@vger.kernel.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> This patch is tested against drm-fixes and drm-next.
> ---
> drivers/gpu/drm/drm_of.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
> index fdb05fb..ca04c34 100644
> --- a/drivers/gpu/drm/drm_of.c
> +++ b/drivers/gpu/drm/drm_of.c
> @@ -331,10 +331,8 @@ static int drm_of_lvds_get_remote_pixels_type(
> * configurations by passing the endpoints explicitly to
> * drm_of_lvds_get_dual_link_pixel_order().
> */
> - if (!current_pt || pixels_type != current_pt) {
> - of_node_put(remote_port);
> + if (!current_pt || pixels_type != current_pt)
> return -EINVAL;
> - }
> }
>
> return pixels_type;
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm: of: Fix double-free bug
2020-07-23 11:10 ` Biju Das
@ 2020-07-26 17:10 ` Sam Ravnborg
-1 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2020-07-26 17:10 UTC (permalink / raw)
To: Biju Das
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter, Fabrizio Castro, Chris Paterson,
Geert Uytterhoeven, Prabhakar Mahadev Lad, dri-devel, Biju Das,
linux-renesas-soc, Laurent Pinchart, stable
Hi Biju
On Thu, Jul 23, 2020 at 12:10:54PM +0100, Biju Das wrote:
> Fix double-free bug in the error path.
>
> Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: stable@vger.kernel.org
Thanks, applied to drm-misc-fixes.
Sam
> ---
> This patch is tested against drm-fixes and drm-next.
> ---
> drivers/gpu/drm/drm_of.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
> index fdb05fb..ca04c34 100644
> --- a/drivers/gpu/drm/drm_of.c
> +++ b/drivers/gpu/drm/drm_of.c
> @@ -331,10 +331,8 @@ static int drm_of_lvds_get_remote_pixels_type(
> * configurations by passing the endpoints explicitly to
> * drm_of_lvds_get_dual_link_pixel_order().
> */
> - if (!current_pt || pixels_type != current_pt) {
> - of_node_put(remote_port);
> + if (!current_pt || pixels_type != current_pt)
> return -EINVAL;
> - }
> }
>
> return pixels_type;
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm: of: Fix double-free bug
@ 2020-07-26 17:10 ` Sam Ravnborg
0 siblings, 0 replies; 6+ messages in thread
From: Sam Ravnborg @ 2020-07-26 17:10 UTC (permalink / raw)
To: Biju Das
Cc: Chris Paterson, Thomas Zimmermann, Geert Uytterhoeven,
David Airlie, dri-devel, Prabhakar Mahadev Lad, Fabrizio Castro,
Biju Das, linux-renesas-soc, stable, Laurent Pinchart
Hi Biju
On Thu, Jul 23, 2020 at 12:10:54PM +0100, Biju Das wrote:
> Fix double-free bug in the error path.
>
> Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
> Reported-by: Pavel Machek <pavel@denx.de>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: stable@vger.kernel.org
Thanks, applied to drm-misc-fixes.
Sam
> ---
> This patch is tested against drm-fixes and drm-next.
> ---
> drivers/gpu/drm/drm_of.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
> index fdb05fb..ca04c34 100644
> --- a/drivers/gpu/drm/drm_of.c
> +++ b/drivers/gpu/drm/drm_of.c
> @@ -331,10 +331,8 @@ static int drm_of_lvds_get_remote_pixels_type(
> * configurations by passing the endpoints explicitly to
> * drm_of_lvds_get_dual_link_pixel_order().
> */
> - if (!current_pt || pixels_type != current_pt) {
> - of_node_put(remote_port);
> + if (!current_pt || pixels_type != current_pt)
> return -EINVAL;
> - }
> }
>
> return pixels_type;
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-07-26 17:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23 11:10 [PATCH] drm: of: Fix double-free bug Biju Das
2020-07-23 11:10 ` Biju Das
2020-07-24 1:33 ` Laurent Pinchart
2020-07-24 1:33 ` Laurent Pinchart
2020-07-26 17:10 ` Sam Ravnborg
2020-07-26 17:10 ` Sam Ravnborg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.