[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0cbcaa64-2cbe-4c8e-86a0-e12da60a42ab@suse.de>
Date: Tue, 10 Sep 2024 09:26:42 +0200
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Jason Andryuk <jandryuk@...il.com>, Helge Deller <deller@....de>,
Arnd Bergmann <arnd@...db.de>, Sam Ravnborg <sam@...nborg.org>
Cc: xen-devel@...ts.xenproject.org, Jason Andryuk <jason.andryuk@....com>,
Arthur Borsboom <arthurborsboom@...il.com>, stable@...r.kernel.org,
linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fbdev/xen-fbfront: Assign fb_info->device
Am 10.09.24 um 04:09 schrieb Jason Andryuk:
> From: Jason Andryuk <jason.andryuk@....com>
>
> Probing xen-fbfront faults in video_is_primary_device(). The passed-in
> struct device is NULL since xen-fbfront doesn't assign it and the
> memory is kzalloc()-ed. Assign fb_info->device to avoid this.
>
> This was exposed by the conversion of fb_is_primary_device() to
> video_is_primary_device() which dropped a NULL check for struct device.
>
> Fixes: f178e96de7f0 ("arch: Remove struct fb_info from video helpers")
> Reported-by: Arthur Borsboom <arthurborsboom@...il.com>
> Closes: https://lore.kernel.org/xen-devel/CALUcmUncX=LkXWeiSiTKsDY-cOe8QksWhFvcCneOKfrKd0ZajA@mail.gmail.com/
> Tested-by: Arthur Borsboom <arthurborsboom@...il.com>
> CC: stable@...r.kernel.org
> Signed-off-by: Jason Andryuk <jason.andryuk@....com>
Reviewed-by: Thomas Zimmermann <tzimmermann@...e.de>
Thanks a lot.
> ---
> The other option would be to re-instate the NULL check in
> video_is_primary_device()
> ---
> drivers/video/fbdev/xen-fbfront.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
> index 66d4628a96ae..c90f48ebb15e 100644
> --- a/drivers/video/fbdev/xen-fbfront.c
> +++ b/drivers/video/fbdev/xen-fbfront.c
> @@ -407,6 +407,7 @@ static int xenfb_probe(struct xenbus_device *dev,
> /* complete the abuse: */
> fb_info->pseudo_palette = fb_info->par;
> fb_info->par = info;
> + fb_info->device = &dev->dev;
>
> fb_info->screen_buffer = info->fb;
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
Powered by blists - more mailing lists