All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 214621] WARNING: CPU: 3 PID: 521 at drivers/gpu/drm/ttm/ttm_bo.c:409 ttm_bo_release+0xb64/0xe40 [ttm]
Date: Thu, 04 Nov 2021 10:16:16 +0000	[thread overview]
Message-ID: <bug-214621-2300-ldjFUft4Cr@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-214621-2300@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=214621

--- Comment #11 from Christian König (christian.koenig@amd.com) ---
Well it's really appreciated that you are looking into this.

One thing we might want to do is to move the warning in dma_buf_release():

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 3f63d58bf68a..6ecc01585cf4 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -75,6 +75,7 @@ static void dma_buf_release(struct dentry *dentry)
         * dma-buf while still having pending operation to the buffer.
         */
        BUG_ON(dmabuf->cb_in.active || dmabuf->cb_out.active);
+       WARN_ON(!list_empty(&dmabuf->attachments));

        dma_buf_stats_teardown(dmabuf);
        dmabuf->ops->release(dmabuf);
@@ -82,7 +83,6 @@ static void dma_buf_release(struct dentry *dentry)
        if (dmabuf->resv == (struct dma_resv *)&dmabuf[1])
                dma_resv_fini(dmabuf->resv);

-       WARN_ON(!list_empty(&dmabuf->attachments));
        module_put(dmabuf->owner);
        kfree(dmabuf->name);
        kfree(dmabuf);

This way users get the dma-buf warning first and maybe a bit less confused.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2021-11-04 10:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 23:41 [Bug 214621] New: WARNING: CPU: 3 PID: 521 at drivers/gpu/drm/ttm/ttm_bo.c:409 ttm_bo_release+0xb64/0xe40 [ttm] bugzilla-daemon
2021-10-04 23:41 ` [Bug 214621] " bugzilla-daemon
2021-10-20 15:15 ` bugzilla-daemon
2021-10-27  7:12 ` bugzilla-daemon
2021-10-27 13:50 ` bugzilla-daemon
2021-11-01  8:46 ` bugzilla-daemon
2021-11-03 18:01 ` bugzilla-daemon
2021-11-04  7:19 ` bugzilla-daemon
2021-11-04  7:54 ` bugzilla-daemon
2021-11-04  8:05 ` bugzilla-daemon
2021-11-04 10:09 ` bugzilla-daemon
2021-11-04 10:16 ` bugzilla-daemon [this message]
2021-11-04 12:15 ` bugzilla-daemon
2021-11-04 12:39 ` bugzilla-daemon
2021-11-04 13:02 ` bugzilla-daemon
2021-11-04 14:13 ` bugzilla-daemon
2021-11-04 14:17 ` bugzilla-daemon
2021-11-04 14:18 ` bugzilla-daemon
2021-11-12 10:10 ` bugzilla-daemon
2021-11-12 11:08 ` bugzilla-daemon
2021-11-12 12:43 ` bugzilla-daemon
2022-02-17 13:12 ` bugzilla-daemon

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=bug-214621-2300-ldjFUft4Cr@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.