Re: [PATCH] fbdev/xen-fbfront: Assign fb_info->device

From: Helge Deller
Date: Wed Sep 11 2024 - 02:00:11 EST


On 9/10/24 04:09, Jason Andryuk wrote:
From: Jason Andryuk <jason.andryuk@xxxxxxx>

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@xxxxxxxxx>
Closes: https://lore.kernel.org/xen-devel/CALUcmUncX=LkXWeiSiTKsDY-cOe8QksWhFvcCneOKfrKd0ZajA@xxxxxxxxxxxxxx/
Tested-by: Arthur Borsboom <arthurborsboom@xxxxxxxxx>
CC: stable@xxxxxxxxxxxxxxx
Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>

applied to fbdev git tree.

Thanks!
Helge