drivers/video/fbdev/xen-fbfront.c | 1 + 1 file changed, 1 insertion(+)
From: Jason Andryuk <jason.andryuk@amd.com>
Hi Arthur,
Can you give the patch below a try? If it works, please respond with a
Tested-by. I'll then submit it with your Reported-by and Tested-by.
Thanks,
Jason
[PATCH] fbdev/xen-fbfront: Assign fb_info->device
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")
CC: stable@vger.kernel.org
Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
---
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;
--
2.43.0
On Sat, 7 Sept 2024 at 15:48, Jason Andryuk <jandryuk@gmail.com> wrote: > > From: Jason Andryuk <jason.andryuk@amd.com> > > Hi Arthur, > > Can you give the patch below a try? If it works, please respond with a > Tested-by. I'll then submit it with your Reported-by and Tested-by. I have tested the following. - Built and installed the Arch Linux AUR package linux-mainline: 6.11.0-rc6-1-mainline. - Booted in PVH > failure: VM is inaccessible. - Booted in HVM > success: VM is accessible. - Applied the patch to the build above. - Booted in PVH > success: VM is accessible. From my point of view this patch works and resolves the issue. Hereby: Tested-by: Arthur Borsboom <arthurborsboom@gmail.com> Do you have an estimation in which kernel version this will land? > Thanks, > Jason > > [PATCH] fbdev/xen-fbfront: Assign fb_info->device > > 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") > CC: stable@vger.kernel.org > Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> > --- > 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; > > -- > 2.43.0 >
Hi Jason, JA> Can you give the patch below a try? If it works, please respond with a Tested-by. I have tested the following. - Built and installed the Arch Linux AUR package linux-mainline: 6.11.0-rc6-1-mainline. - Booted in PVH > failure: VM is inaccessible. - Booted in HVM > success: VM is accessible. - Applied the patch to the build above. - Booted in PVH > success: VM is accessible. From my point of view this patch works and resolves the issue. Hereby: Tested-by: Arthur Borsboom <arthurborsboom@gmail.com> Do you have an estimation in which kernel version this will land? On Sat, 7 Sept 2024 at 15:48, Jason Andryuk <jandryuk@gmail.com> wrote: > From: Jason Andryuk <jason.andryuk@amd.com> > > Hi Arthur, > > Can you give the patch below a try? If it works, please respond with a > Tested-by. I'll then submit it with your Reported-by and Tested-by. > > Thanks, > Jason > > [PATCH] fbdev/xen-fbfront: Assign fb_info->device > > 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") > CC: stable@vger.kernel.org > Signed-off-by: Jason Andryuk <jason.andryuk@amd.com> > --- > 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; > > -- > 2.43.0 > >
© 2016 - 2024 Red Hat, Inc.