All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
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>
Subject: Re: [PATCH] dma-buf: free dmabuf->name in dma_buf_release()
Date: Thu, 27 Feb 2020 13:38:03 -0800	[thread overview]
Message-ID: <CAM_iQpU7kXXGuxeOVvAGLoBRvjrhpuw2D=ih=PagGXKK-g_muw@mail.gmail.com> (raw)
In-Reply-To: <20200225175418.2d3af2180cbf895b727ce4b1@linux-foundation.org>

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.

Thanks.

WARNING: multiple messages have this Message-ID (diff)
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Chenbo Feng <fengc@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
	syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-media@vger.kernel.org
Subject: Re: [PATCH] dma-buf: free dmabuf->name in dma_buf_release()
Date: Thu, 27 Feb 2020 13:38:03 -0800	[thread overview]
Message-ID: <CAM_iQpU7kXXGuxeOVvAGLoBRvjrhpuw2D=ih=PagGXKK-g_muw@mail.gmail.com> (raw)
In-Reply-To: <20200225175418.2d3af2180cbf895b727ce4b1@linux-foundation.org>

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.

Thanks.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-02-27 21:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 20:44 [PATCH] dma-buf: free dmabuf->name in dma_buf_release() Cong Wang
2020-02-25 20:44 ` Cong Wang
2020-02-26  1:54 ` Andrew Morton
2020-02-26  1:54   ` Andrew Morton
2020-02-27 21:38   ` Cong Wang [this message]
2020-02-27 21:38     ` Cong Wang
2020-02-27 21:45     ` Andrew Morton
2020-02-27 21:45       ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2019-12-27  6:32 Cong Wang
2019-12-27  6:32 ` Cong Wang
2020-02-18 18:40 ` Chenbo Feng
2020-02-18 18:41 ` Chenbo Feng
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='CAM_iQpU7kXXGuxeOVvAGLoBRvjrhpuw2D=ih=PagGXKK-g_muw@mail.gmail.com' \
    --to=xiyou.wangcong@gmail.com \
    --cc=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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.