Skip to content

Commit b794918

Browse files
Tetsuo HandaChristianKoenigAMD
authored andcommitted
dma-buf/sw-sync: don't enable IRQ from sync_print_obj()
Since commit a6aa8fc ("dma-buf/sw-sync: Reduce irqsave/irqrestore from known context") by error replaced spin_unlock_irqrestore() with spin_unlock_irq() for both sync_debugfs_show() and sync_print_obj() despite sync_print_obj() is called from sync_debugfs_show(), lockdep complains inconsistent lock state warning. Use plain spin_{lock,unlock}() for sync_print_obj(), for sync_debugfs_show() is already using spin_{lock,unlock}_irq(). Reported-by: syzbot <[email protected]> Closes: https://syzkaller.appspot.com/bug?extid=a225ee3df7e7f9372dbe Fixes: a6aa8fc ("dma-buf/sw-sync: Reduce irqsave/irqrestore from known context") Signed-off-by: Tetsuo Handa <[email protected]> Reviewed-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
1 parent 39bc27b commit b794918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma-buf/sync_debug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
110110

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

113-
spin_lock_irq(&obj->lock);
113+
spin_lock(&obj->lock); /* Caller already disabled IRQ. */
114114
list_for_each(pos, &obj->pt_list) {
115115
struct sync_pt *pt = container_of(pos, struct sync_pt, link);
116116
sync_print_fence(s, &pt->base, false);
117117
}
118-
spin_unlock_irq(&obj->lock);
118+
spin_unlock(&obj->lock);
119119
}
120120

121121
static void sync_print_sync_file(struct seq_file *s,

0 commit comments

Comments
 (0)