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,
LKML <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>,
Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH] dma-buf: free dmabuf->name in dma_buf_release()
Date: Thu, 27 Feb 2020 13:45:41 -0800 [thread overview]
Message-ID: <20200227134541.82309165d59b3ce10848563a@linux-foundation.org> (raw)
In-Reply-To: <CAM_iQpU7kXXGuxeOVvAGLoBRvjrhpuw2D=ih=PagGXKK-g_muw@mail.gmail.com>
On Thu, 27 Feb 2020 13:38:03 -0800 Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Tue, Feb 25, 2020 at 5:54 PM Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > 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?
>
> It looks unprivileged to me, as I don't see capable() called along
> the path.
>
OK, thanks. I added cc:stable to my copy.
next prev parent reply other threads:[~2020-02-27 21:45 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
2020-02-27 21:38 ` Cong Wang
2020-02-27 21:45 ` Andrew Morton [this message]
-- 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=20200227134541.82309165d59b3ce10848563a@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=daniel@ffwll.ch \
--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®