From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+0f999d26a4fd79c3a23b@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [dri?] KASAN: slab-use-after-free Read in drm_atomic_helper_wait_for_vblanks (2)
Date: Wed, 14 Feb 2024 15:01:44 +0800 [thread overview]
Message-ID: <20240214070145.360-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000ec4c32061143ec95@google.com>
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)
--
next prev parent reply other threads:[~2024-02-14 7:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 10:50 [syzbot] [dri?] KASAN: slab-use-after-free Read in drm_atomic_helper_wait_for_vblanks (2) syzbot
2024-02-13 14:08 ` syzbot
2024-02-14 1:32 ` Hillf Danton
2024-02-14 2:01 ` syzbot
2024-02-14 3:39 ` Hillf Danton
2024-02-14 3:55 ` syzbot
2024-02-14 7:01 ` Hillf Danton [this message]
2024-02-14 7:26 ` syzbot
2024-02-14 11:18 ` Hillf Danton
2024-02-14 11:55 ` syzbot
2024-02-15 10:15 ` Edward Adam Davis
2024-02-15 10:39 ` syzbot
2024-02-15 13:02 ` [PATCH] drm/atomic-helpers: fix uaf in drm_atomic_helper_wait_for_vblanks Edward Adam Davis
2024-02-15 15:12 ` [PATCH v2] " Edward Adam Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240214070145.360-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+0f999d26a4fd79c3a23b@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.