[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200225204446.11378-1-xiyou.wangcong@gmail.com>
Date: Tue, 25 Feb 2020 12:44:46 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: linux-media@...r.kernel.org
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linaro-mm-sig@...ts.linaro.org,
Cong Wang <xiyou.wangcong@...il.com>,
syzbot+b2098bc44728a4efb3e9@...kaller.appspotmail.com,
Chenbo Feng <fengc@...gle.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [PATCH] dma-buf: free dmabuf->name in dma_buf_release()
dma-buff name can be set via DMA_BUF_SET_NAME ioctl, but once set
it never gets freed.
Free it in dma_buf_release().
Fixes: bb2bb9030425 ("dma-buf: add DMA_BUF_SET_NAME ioctls")
Reported-by: syzbot+b2098bc44728a4efb3e9@...kaller.appspotmail.com
Acked-by: Chenbo Feng <fengc@...gle.com>
Cc: Sumit Semwal <sumit.semwal@...aro.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
---
drivers/dma-buf/dma-buf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index d4097856c86b..c343c7c10b4c 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -108,6 +108,7 @@ static int dma_buf_release(struct inode *inode, struct file *file)
dma_resv_fini(dmabuf->resv);
module_put(dmabuf->owner);
+ kfree(dmabuf->name);
kfree(dmabuf);
return 0;
}
--
2.21.1
Powered by blists - more mailing lists