]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: Fix an ulong overflow in the dotclock driver
authorBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 18 Oct 2018 10:02:50 +0000 (12:02 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Fri, 19 Oct 2018 09:50:25 +0000 (11:50 +0200)
commitc94e4d455a5232308ccfdc52bc0cc775fd2382a5
treea479bb12e9d290e8f14da3402ad48fcabf9cf6d0
parent06b63b4afe39679234d18000ae2ff407c5d2a91a
drm/sun4i: Fix an ulong overflow in the dotclock driver

The calculated ideal rate can easily overflow an unsigned long, thus
making the best div selection buggy as soon as no ideal match is found
before the overflow occurs.

Fixes: f69437fc6abb ("drm/sun4i: request exact rates to our parents")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181018100250.12565-1-boris.brezillon@bootlin.com
drivers/gpu/drm/sun4i/sun4i_dotclock.c