[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-stable-commits
Subject: Patch "fbmem: Check virtual screen sizes in fb_set_var()" has been added to the 4.14-stable tree
From: <gregkh () linuxfoundation ! org>
Date: 2022-07-31 12:16:18
Message-ID: 1659269778251244 () kroah ! com
[Download RAW message or body]
This is a note to let you know that I've just added the patch titled
fbmem: Check virtual screen sizes in fb_set_var()
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
fbmem-check-virtual-screen-sizes-in-fb_set_var.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From foo@baz Sun Jul 31 01:15:12 PM CEST 2022
From: Chen Jun <chenjun102@huawei.com>
Date: Fri, 29 Jul 2022 03:11:40 +0000
Subject: fbmem: Check virtual screen sizes in fb_set_var()
To: <stable@vger.kernel.org>, <deller@gmx.de>, <geert@linux-m68k.org>, \
<b.zolnierkie@samsung.com>, <gregkh@linuxfoundation.org>
Cc: <xuqiang36@huawei.com>, <xiujianfeng@huawei.com>
Message-ID: <20220729031140.21806-3-chenjun102@huawei.com>
From: Helge Deller <deller@gmx.de>
commit 6c11df58fd1ac0aefcb3b227f72769272b939e56 upstream
Verify that the fbdev or drm driver correctly adjusted the virtual
screen sizes. On failure report the failing driver and reject the screen
size change.
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/all/20220706150253.2186-1-deller@gmx.de/
[sudip: adjust context]
Signed-off-by: Chen Jun <chenjun102@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/video/fbdev/core/fbmem.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1019,6 +1019,16 @@ fb_set_var(struct fb_info *info, struct
if (ret)
goto done;
+ /* verify that virtual resolution >= physical resolution */
+ if (var->xres_virtual < var->xres ||
+ var->yres_virtual < var->yres) {
+ pr_warn("WARNING: fbcon: Driver '%s' missed to adjust virtual screen size (%ux%u \
vs. %ux%u)\n", + info->fix.id,
+ var->xres_virtual, var->yres_virtual,
+ var->xres, var->yres);
+ return -EINVAL;
+ }
+
if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
struct fb_var_screeninfo old_var;
struct fb_videomode mode;
Patches currently in stable-queue which might be from chenjun102@huawei.com are
queue-4.14/fbmem-check-virtual-screen-sizes-in-fb_set_var.patch
queue-4.14/fbcon-prevent-that-screen-size-is-smaller-than-font-size.patch
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic