]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/modes: Avoid divide by zero harder in drm_mode_vrefresh()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 29 Nov 2024 04:26:28 +0000 (06:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:28:33 +0000 (13:28 +0100)
commite7c7b48a0fc5ed83baae400a1b15e33978c25d7f
treee7aa6094fb48f6e55ccfdf241948579604b0179d
parentd4ca3bf078cb66b05292961272529443fa7fed35
drm/modes: Avoid divide by zero harder in drm_mode_vrefresh()

commit 9398332f23fab10c5ec57c168b44e72997d6318e upstream.

drm_mode_vrefresh() is trying to avoid divide by zero
by checking whether htotal or vtotal are zero. But we may
still end up with a div-by-zero of vtotal*htotal*...

Cc: stable@vger.kernel.org
Reported-by: syzbot+622bba18029bcde672e1@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=622bba18029bcde672e1
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241129042629.18280-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_modes.c