mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
	syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com,
	Chenbo Feng <fengc@google.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] dma-buf: free dmabuf->name in dma_buf_release()
Date: Tue, 25 Feb 2020 17:54:18 -0800	[thread overview]
Message-ID: <20200225175418.2d3af2180cbf895b727ce4b1@linux-foundation.org> (raw)
In-Reply-To: <20200225204446.11378-1-xiyou.wangcong@gmail.com>

On Tue, 25 Feb 2020 12:44:46 -0800 Cong Wang <xiyou.wangcong@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?

  reply	other threads:[~2020-02-26  1:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 20:44 Cong Wang
2020-02-26  1:54 ` Andrew Morton [this message]
2020-02-27 21:38   ` Cong Wang
2020-02-27 21:45     ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2019-12-27  6:32 Cong Wang
2020-02-18 18:41 ` Chenbo Feng

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=20200225175418.2d3af2180cbf895b727ce4b1@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fengc@google.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com \
    --cc=torvalds@linux-foundation.org \
    --cc=xiyou.wangcong@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®