Commit 572994bf18ff ("drm/ast: Zero is missing in detect function") prevents some systems from booting. Seen on Supermicro Super Server/X10SRL-F, BIOS 3.3 10/28/2020 . There's further a bug that results in
KASAN: use-after-free in enqueue_timer+0x4f/0x1e0 which is also triggered by commit 572994bf18ff ("drm/ast: Zero is missing in detect function"). Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de> Fixes: 572994bf18ff ("drm/ast: Zero is missing in detect function") Reported-by: Chuck Lever III <chuck.le...@oracle.com> Reported-by: Kim Phillips <kim.phill...@amd.com> Cc: Ainux.Wang <ainux.w...@gmail.com> Cc: Thomas Zimmermann <tzimmerm...@suse.de> Cc: Dave Airlie <airl...@redhat.com> Cc: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/dri-devel/a194b6ce-af77-422d-a92f-292abd83b...@oracle.com/ --- drivers/gpu/drm/ast/ast_mode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 6bfaefa01818..ea64944ad4ca 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -1306,7 +1306,7 @@ static enum drm_connector_status ast_connector_detect(struct drm_connector int r; r = ast_get_modes(connector); - if (r <= 0) + if (r < 0) return connector_status_disconnected; return connector_status_connected; -- 2.33.0