OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77d08a2
)
drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var
author
Daniel Vetter
<daniel.vetter@ffwll.ch>
Tue, 4 Apr 2023 19:40:36 +0000
(21:40 +0200)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Wed, 5 Apr 2023 20:42:10 +0000
(22:42 +0200)
Drivers are supposed to fix this up if needed if they don't outright
reject it. Uncovered by
6c11df58fd1a
("fbmem: Check virtual screen
sizes in fb_set_var()").
Reported-by: syzbot+20dcf81733d43ddff661@syzkaller.appspotmail.com
Link:
https://syzkaller.appspot.com/bug?id=c5faf983bfa4a607de530cd3bb008888bf06cefc
Cc: stable@vger.kernel.org # v5.4+
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20230404194038.472803-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_fb_helper.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_fb_helper.c
b/drivers/gpu/drm/drm_fb_helper.c
index
63ec95e
..
aa9efc6
100644
(file)
--- a/
drivers/gpu/drm/drm_fb_helper.c
+++ b/
drivers/gpu/drm/drm_fb_helper.c
@@
-1589,6
+1589,9
@@
int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
return -EINVAL;
}
+ var->xres_virtual = fb->width;
+ var->yres_virtual = fb->height;
+
/*
* Workaround for SDL 1.2, which is known to be setting all pixel format
* fields values to zero in some cases. We treat this situation as a