Thread (6 messages) flat view 6 messages, 2 authors, 2021-07-20

Re: [PATCH v2] dma_buf: remove dmabuf sysfs teardown before release

From: Christian König <christian.koenig@amd.com>
Date: 2021-07-20 11:05:35
Also in: dri-devel, linux-media, linux-mediatek, lkml

Am 20.07.21 um 12:31 schrieb guangming.cao@mediatek.com:
From: Guangming Cao <redacted>

Dmabuf sysfs stat is used for dmabuf info track.
But these file maybe still in use after buffer released,
should clear it before buffer release.

Signed-off-by: Guangming Cao <redacted>
Reviewed and pushed to drm-misc-next.

Thanks,
Christian.
quoted hunk ↗ jump to hunk
---
  drivers/dma-buf/dma-buf.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index b1a6db71c656..63d32261b63f 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -76,12 +76,12 @@ static void dma_buf_release(struct dentry *dentry)
  	 */
  	BUG_ON(dmabuf->cb_shared.active || dmabuf->cb_excl.active);
  
+	dma_buf_stats_teardown(dmabuf);
  	dmabuf->ops->release(dmabuf);
  
  	if (dmabuf->resv == (struct dma_resv *)&dmabuf[1])
  		dma_resv_fini(dmabuf->resv);
  
-	dma_buf_stats_teardown(dmabuf);
  	module_put(dmabuf->owner);
  	kfree(dmabuf->name);
  	kfree(dmabuf);

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help