Patch "dma-buf/sw-sync: don't enable IRQ from sync_print_obj()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dma-buf/sw-sync: don't enable IRQ from sync_print_obj()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dma-buf-sw-sync-don-t-enable-irq-from-sync_print_obj.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0871cc6b6908ba3e045f343347bb600b3842738b
Author: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Date:   Sun May 5 23:08:31 2024 +0900

    dma-buf/sw-sync: don't enable IRQ from sync_print_obj()
    
    [ Upstream commit b794918961516f667b0c745aebdfebbb8a98df39 ]
    
    Since commit a6aa8fca4d79 ("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 <syzbot+a225ee3df7e7f9372dbe@xxxxxxxxxxxxxxxxxxxxxxxxx>
    Closes: https://syzkaller.appspot.com/bug?extid=a225ee3df7e7f9372dbe
    Fixes: a6aa8fca4d79 ("dma-buf/sw-sync: Reduce irqsave/irqrestore from known context")
    Signed-off-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
    Reviewed-by: Christian König <christian.koenig@xxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/c2e46020-aaa6-4e06-bf73-f05823f913f0@xxxxxxxxxxxxxxxxxxx
    Signed-off-by: Christian König <christian.koenig@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c
index 101394f16930f..237bce21d1e72 100644
--- a/drivers/dma-buf/sync_debug.c
+++ b/drivers/dma-buf/sync_debug.c
@@ -110,12 +110,12 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
 
 	seq_printf(s, "%s: %d\n", obj->name, obj->value);
 
-	spin_lock_irq(&obj->lock);
+	spin_lock(&obj->lock); /* Caller already disabled IRQ. */
 	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(&obj->lock);
 }
 
 static void sync_print_sync_file(struct seq_file *s,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux