Skip to contentSkip to conversation

Revert "drm/ast: Zero is missing in detect function"

PATCH In review Thomas Zimmermann 2 participants 2 messages Oct 15, 2021

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 Revert "drm/ast: Zero is missing in detect function"

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").

Fixes 572994bf18ff ("drm/ast: Zero is missing in detect function")
Cc Ainux.Wang <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Dave Airlie <[email protected]>
---
 drivers/gpu/drm/ast/ast_mode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ast/ast_mode.c +1 -1
index 6bfaefa01818..ea64944ad4ca 100644
@@ -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;
Signature · 1 line
2.33.0
#1 lore raw
Quoted 9 lines · Thomas Zimmermann

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").

That last statement is technically wrong. Like I said, in my case [1], the bad commit is commit aae74ff9caa8 ("drm/ast:
Add detect function support")

Please revert aae74ff9caa8.

Thanks,

Kim

[1] https://www.spinics.net/lists/dri-devel/msg318039.html