[PATCH] dma-buf: free dmabuf->name in dma_buf_release()
Andrew Morton
akpm at linux-foundation.org
Wed Feb 26 01:54:18 UTC 2020
On Tue, 25 Feb 2020 12:44:46 -0800 Cong Wang <xiyou.wangcong at gmail.com> wrote:
> 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().
>
> ...
>
> --- 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;
> }
ow. Is that ioctl privileged?
More information about the dri-devel
mailing list