On Thu, Aug 04, 2022 at 11:15:38AM +0000, Chen Jun wrote:
From: Helge Deller deller@gmx.de
commit e64242caef18b4a5840b0e7a9bff37abd4f4f933 upstream
We need to prevent that users configure a screen size which is smaller than the currently selected font size. Otherwise rendering chars on the screen will access memory outside the graphics memory region.
This patch adds a new function fbcon_modechange_possible() which implements this check and which later may be extended with other checks if necessary. The new function is called from the FBIOPUT_VSCREENINFO ioctl handler in fbmem.c, which will return -EINVAL if userspace asked for a too small screen size.
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]
Who is "sudip" here?
And the Link: line wasn't in the original commit, where did that come from?
thanks,
greg k-h