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:Wei Chen <harperchen1110@gmail.com> Signed-off-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com> (cherry picked from commit 1a9884da)
Loading
Please sign in to comment