[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240214070145.360-1-hdanton@sina.com>
Date: Wed, 14 Feb 2024 15:01:44 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+0f999d26a4fd79c3a23b@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [dri?] KASAN: slab-use-after-free Read in drm_atomic_helper_wait_for_vblanks (2)
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
@@ -987,6 +987,7 @@ static int drm_client_modeset_commit_ato
struct drm_mode_set *mode_set;
int ret;
+retry:
drm_modeset_acquire_init(&ctx, 0);
state = drm_atomic_state_alloc(dev);
@@ -996,7 +997,6 @@ static int drm_client_modeset_commit_ato
}
state->acquire_ctx = &ctx;
-retry:
drm_for_each_plane(plane, dev) {
struct drm_plane_state *plane_state;
@@ -1051,21 +1051,15 @@ retry:
ret = drm_atomic_commit(state);
out_state:
- if (ret == -EDEADLK)
- goto backoff;
-
drm_atomic_state_put(state);
out_ctx:
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
- return ret;
-
-backoff:
- drm_atomic_state_clear(state);
- drm_modeset_backoff(&ctx);
+ if (ret == -EDEADLK)
+ goto retry;
- goto retry;
+ return ret;
}
static int drm_client_modeset_commit_legacy(struct drm_client_dev *client)
--
Powered by blists - more mailing lists