[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8980975d-87db-4d57-9e23-4fb7fbb62e7d@gmail.com>
Date: Tue, 7 May 2024 15:09:56 +0200
From: Christian König <ckoenig.leichtzumerken@...il.com>
To: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
syzbot <syzbot+a225ee3df7e7f9372dbe@...kaller.appspotmail.com>,
syzkaller-bugs@...glegroups.com, Sumit Semwal <sumit.semwal@...aro.org>,
Gustavo Padovan <gustavo@...ovan.org>,
Christian Konig <christian.koenig@....com>, Sean Paul
<seanpaul@...omium.org>, Chris Wilson <chris@...is-wilson.co.uk>
Cc: linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linaro-mm-sig@...ts.linaro.org, dri-devel@...ts.freedesktop.org
Subject: Re: [Linaro-mm-sig] [PATCH] dma-buf/sw-sync: don't enable IRQ from
sync_print_obj()
Am 05.05.24 um 16:08 schrieb Tetsuo Handa:
> 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@...kaller.appspotmail.com>
> 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@...ove.SAKURA.ne.jp>
Reviewed-by: Christian König <christian.koenig@....com>
> ---
> drivers/dma-buf/sync_debug.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma-buf/sync_debug.c b/drivers/dma-buf/sync_debug.c
> index 101394f16930..237bce21d1e7 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,
Powered by blists - more mailing lists