mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] drivers: video: efi-gop: fix null reference pointer on priv->fb.mode=NULL.
@ 2025-08-28  4:14 chalianis1
  2025-09-01 10:36 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: chalianis1 @ 2025-08-28  4:14 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox, Chali Anis

From: Chali Anis <chalianis1@gmail.com>

fix a null reference pointer on mode variable, that was never initialized,
the mode will be set by the framebuffer subsyetem after initialisation so
it's not necessary to change the resolution here.

Fixes: 6518b21c6c66 ("video: add EFI Graphics Output Protocol support")

Signed-off-by: Chali Anis <chalianis1@gmail.com>
---
 drivers/video/efi_gop.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/video/efi_gop.c b/drivers/video/efi_gop.c
index f4f58d9271f5..cef8a6816cac 100644
--- a/drivers/video/efi_gop.c
+++ b/drivers/video/efi_gop.c
@@ -169,8 +169,6 @@ static int efi_gop_query(struct efi_gop_priv *priv)
 
 	priv->fb.screen_base = mode->frame_buffer_base;
 	priv->mode = mode->mode;
-	priv->fb.xres = priv->fb.mode->xres;
-	priv->fb.yres = priv->fb.mode->yres;
 
 	return 0;
 }
-- 
2.34.1




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

* Re: [PATCH] drivers: video: efi-gop: fix null reference pointer on priv->fb.mode=NULL.
  2025-08-28  4:14 [PATCH] drivers: video: efi-gop: fix null reference pointer on priv->fb.mode=NULL chalianis1
@ 2025-09-01 10:36 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2025-09-01 10:36 UTC (permalink / raw)
  To: chalianis1, s.hauer; +Cc: barebox

Hi,

On 8/28/25 6:14 AM, chalianis1@gmail.com wrote:
> From: Chali Anis <chalianis1@gmail.com>
> 
> fix a null reference pointer on mode variable, that was never initialized,
> the mode will be set by the framebuffer subsyetem after initialisation so
> it's not necessary to change the resolution here.
> 
> Fixes: 6518b21c6c66 ("video: add EFI Graphics Output Protocol support")
> 
> Signed-off-by: Chali Anis <chalianis1@gmail.com>

Uhh, so this has always been a null pointer dereference so far, but NULL
page read didn't trap for us on x86..?

Anyways:

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Thanks,
Ahmad

> ---
>  drivers/video/efi_gop.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/video/efi_gop.c b/drivers/video/efi_gop.c
> index f4f58d9271f5..cef8a6816cac 100644
> --- a/drivers/video/efi_gop.c
> +++ b/drivers/video/efi_gop.c
> @@ -169,8 +169,6 @@ static int efi_gop_query(struct efi_gop_priv *priv)
>  
>  	priv->fb.screen_base = mode->frame_buffer_base;
>  	priv->mode = mode->mode;
> -	priv->fb.xres = priv->fb.mode->xres;
> -	priv->fb.yres = priv->fb.mode->yres;
>  
>  	return 0;
>  }

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




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

end of thread, other threads:[~2025-09-01 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-28  4:14 [PATCH] drivers: video: efi-gop: fix null reference pointer on priv->fb.mode=NULL chalianis1
2025-09-01 10:36 ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox