Commit c5542a02 authored by Wei Chen's avatar Wei Chen Committed by openeuler-sync-bot
Browse files

fbdev: intelfb: Fix potential divide by zero

stable inclusion
from stable-v5.10.177
commit c2be7f80562dcc82382857cecc97d4c23c1140cf
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c2be7f80562dcc82382857cecc97d4c23c1140cf



--------------------------------

[ Upstream commit d8236854 ]

Variable var->pixclock is controlled by user and can be assigned
to zero. Without proper check, divide by zero would occur in
intelfbhw_validate_mode and intelfbhw_mode_to_hw.

Error out if var->pixclock is zero.

Signed-off-by: default avatarWei Chen <harperchen1110@gmail.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
(cherry picked from commit 1a9884da)
parent 6487b4e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment