lkml.org 
[lkml]   [2024]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [syzbot] [dri?] [media?] inconsistent lock state in valid_state (2)
Date
On Mon, 26 Feb 2024 16:56:17 -0800
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: d206a76d7d27 Linux 6.8-rc6
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1704b3e2180000

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

--- x/drivers/dma-buf/sync_debug.c
+++ y/drivers/dma-buf/sync_debug.c
@@ -107,15 +107,16 @@ static void sync_print_fence(struct seq_
static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
{
struct list_head *pos;
+ unsigned long flags;

seq_printf(s, "%s: %d\n", obj->name, obj->value);

- spin_lock_irq(&obj->lock);
+ spin_lock_irqsave(&obj->lock, flags);
list_for_each(pos, &obj->pt_list) {
struct sync_pt *pt = container_of(pos, struct sync_pt, link);
sync_print_fence(s, &pt->base, false);
}
- spin_unlock_irq(&obj->lock);
+ spin_unlock_irqrestore(&obj->lock, flags);
}

static void sync_print_sync_file(struct seq_file *s,
--
\
 
 \ /
  Last update: 2024-05-27 15:24    [W:1.338 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site