[PATCH] Revert "drm/ast: Zero is missing in detect function"
Thomas Zimmermann
tzimmermann at suse.de
Fri Oct 15 07:25:46 UTC 2021
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 <tzimmermann at suse.de>
Fixes: 572994bf18ff ("drm/ast: Zero is missing in detect function")
Reported-by: Chuck Lever III <chuck.lever at oracle.com>
Reported-by: Kim Phillips <kim.phillips at amd.com>
Cc: Ainux.Wang <ainux.wang at gmail.com>
Cc: Thomas Zimmermann <tzimmermann at suse.de>
Cc: Dave Airlie <airlied at redhat.com>
Cc: dri-devel at lists.freedesktop.org
Link: https://lore.kernel.org/dri-devel/A194B6CE-AF77-422D-A92F-292ABD83BCCE@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
More information about the dri-devel
mailing list