From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
syzbot <syzbot+a225ee3df7e7f9372dbe@syzkaller.appspotmail.com>,
syzkaller-bugs@googlegroups.com,
Sumit Semwal <sumit.semwal@linaro.org>,
Gustavo Padovan <gustavo@padovan.org>,
Christian Konig <christian.koenig@amd.com>,
Sean Paul <seanpaul@chromium.org>,
Chris Wilson <chris@chris-wilson.co.uk>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org
Subject: Re: [Linaro-mm-sig] [PATCH] dma-buf/sw-sync: don't enable IRQ from sync_print_obj()
Date: Mon, 27 May 2024 09:02:54 +0200 [thread overview]
Message-ID: <0b04b587-77a4-4ac4-8b15-6cde0f0c5f5a@gmail.com> (raw)
In-Reply-To: <0204a827-ca88-4cb6-839b-f4a637bcbf71@I-love.SAKURA.ne.jp>
Am 24.05.24 um 15:26 schrieb Tetsuo Handa:
> On 2024/05/07 22:09, Christian König wrote:
>> 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@syzkaller.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@I-love.SAKURA.ne.jp>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
> Thank you. Who can take this patch?
I pushed it to drm-misc-fixes.
Thanks,
Christian.
>
>>> ---
>>> 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,
prev parent reply other threads:[~2024-05-27 7:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 0:07 [syzbot] [dri?] [media?] inconsistent lock state in valid_state (2) syzbot
2024-02-27 0:56 ` syzbot
2024-02-27 10:53 ` Hillf Danton
2024-02-27 11:16 ` syzbot
2024-05-05 14:08 ` [PATCH] dma-buf/sw-sync: don't enable IRQ from sync_print_obj() Tetsuo Handa
2024-05-07 13:09 ` [Linaro-mm-sig] " Christian König
2024-05-24 13:26 ` Tetsuo Handa
2024-05-27 7:02 ` Christian König [this message]
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=0b04b587-77a4-4ac4-8b15-6cde0f0c5f5a@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=chris@chris-wilson.co.uk \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=seanpaul@chromium.org \
--cc=sumit.semwal@linaro.org \
--cc=syzbot+a225ee3df7e7f9372dbe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®