[Bug 214621] WARNING: CPU: 3 PID: 521 at drivers/gpu/drm/ttm/ttm_bo.c:409 ttm_bo_release+0xb64/0xe40 [ttm]

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

 



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

--- Comment #12 from Lang Yu (Lang.Yu@xxxxxxx) ---
(In reply to Christian König from comment #11)
> 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.

The warning was just merged into mainline 5.15.0 on Tue Nov 2 16:47:49
2021(commit 56d33754481f). Not sure Erhard F.'s build contains this warning. 

And we can also add a debug WARN() into amdgpu_dma_buf_pin() to see who pinned
dma_buf.

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

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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux