Re: [syzbot] [dri?] KASAN: slab-use-after-free Read in drm_atomic_helper_wait_for_vblanks (2)

From: Hillf Danton
Date: Tue Feb 13 2024 - 22:40:09 EST


On Tue, 13 Feb 2024 06:08:15 -0800
> HEAD commit: c664e16bb1ba Merge tag 'docs-6.8-fixes2' of git://git.lwn...
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11fcdba2180000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

--- x/drivers/gpu/drm/drm_client_modeset.c
+++ y/drivers/gpu/drm/drm_client_modeset.c
@@ -1062,6 +1062,8 @@ out_ctx:
return ret;

backoff:
+ if (state->commit_work.func)
+ cancel_work_sync(&state->commit_work);
drm_atomic_state_clear(state);
drm_modeset_backoff(&ctx);

--