linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: + dma-buf-free-dmabuf-name-in-dma_buf_release.patch added to -mm tree
       [not found] ` <20200226015504.7GW9ptoIA%akpm@linux-foundation.org>
@ 2020-02-26  4:29   ` Sumit Semwal
  2020-02-26  9:36     ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Sumit Semwal @ 2020-02-26  4:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Chenbo Feng, Greg Hackmann, mm-commits, xiyou.wangcong,
	DRI mailing list, open list:DMA BUFFER SHARING FRAMEWORK

Hello Andrew,


On Wed, 26 Feb 2020 at 07:25, Andrew Morton <akpm@linux-foundation.org> wrote:
>
>
> The patch titled
>      Subject: dma-buf: free dmabuf->name in dma_buf_release()
> has been added to the -mm tree.  Its filename is
>      dma-buf-free-dmabuf-name-in-dma_buf_release.patch

Thanks for taking this patch via -mm during my absence (I'm just
returning from a bit of an illness). If there are other dma-buf
patches on your radar that you'd like to take via the mm tree, please
let me know and I can provide the necessary Acks.
Else I will take them in via drm-misc as usual.


>
> This patch should soon appear at
>     http://ozlabs.org/~akpm/mmots/broken-out/dma-buf-free-dmabuf-name-in-dma_buf_release.patch
> and later at
>     http://ozlabs.org/~akpm/mmotm/broken-out/dma-buf-free-dmabuf-name-in-dma_buf_release.patch
>
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
>
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
>
> ------------------------------------------------------
> From: Cong Wang <xiyou.wangcong@gmail.com>
> Subject: 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().
>
> Link: http://lkml.kernel.org/r/20200225204446.11378-1-xiyou.wangcong@gmail.com
> Fixes: bb2bb9030425 ("dma-buf: add DMA_BUF_SET_NAME ioctls")
> Reported-by: syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
> Acked-by: Chenbo Feng <fengc@google.com>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: Greg Hackmann <ghackmann@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
>  drivers/dma-buf/dma-buf.c |    1 +
>  1 file changed, 1 insertion(+)
>
> --- a/drivers/dma-buf/dma-buf.c~dma-buf-free-dmabuf-name-in-dma_buf_release
> +++ a/drivers/dma-buf/dma-buf.c
> @@ -108,6 +108,7 @@ static int dma_buf_release(struct inode
>                 dma_resv_fini(dmabuf->resv);
>
>         module_put(dmabuf->owner);
> +       kfree(dmabuf->name);
>         kfree(dmabuf);
>         return 0;
>  }
> _
>
> Patches currently in -mm which might be from xiyou.wangcong@gmail.com are
>
> dma-buf-free-dmabuf-name-in-dma_buf_release.patch
>
Thanks and best regards,
Sumit.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: + dma-buf-free-dmabuf-name-in-dma_buf_release.patch added to -mm tree
  2020-02-26  4:29   ` + dma-buf-free-dmabuf-name-in-dma_buf_release.patch added to -mm tree Sumit Semwal
@ 2020-02-26  9:36     ` Daniel Vetter
  2020-02-27  4:20       ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2020-02-26  9:36 UTC (permalink / raw)
  To: Sumit Semwal
  Cc: Andrew Morton, mm-commits, Chenbo Feng, DRI mailing list,
	Greg Hackmann, WANG Cong, open list:DMA BUFFER SHARING FRAMEWORK

On Wed, Feb 26, 2020 at 5:29 AM Sumit Semwal <sumit.semwal@linaro.org> wrote:
>
> Hello Andrew,
>
>
> On Wed, 26 Feb 2020 at 07:25, Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> >
> > The patch titled
> >      Subject: dma-buf: free dmabuf->name in dma_buf_release()
> > has been added to the -mm tree.  Its filename is
> >      dma-buf-free-dmabuf-name-in-dma_buf_release.patch
>
> Thanks for taking this patch via -mm during my absence (I'm just
> returning from a bit of an illness). If there are other dma-buf
> patches on your radar that you'd like to take via the mm tree, please
> let me know and I can provide the necessary Acks.
> Else I will take them in via drm-misc as usual.

I thought at least that for cases like these -mm is the last resort
tree, so proper thing to do here is apply this fix to drm-misc-fixes
and get it out there. -mm rebases, so will fall out again.

Also maybe we should have had some tests for this, plus some
integration with the gem object name instead of duplicating buffer
object names everywhere for different reasons.
-Daniel

>
> >
> > This patch should soon appear at
> >     http://ozlabs.org/~akpm/mmots/broken-out/dma-buf-free-dmabuf-name-in-dma_buf_release.patch
> > and later at
> >     http://ozlabs.org/~akpm/mmotm/broken-out/dma-buf-free-dmabuf-name-in-dma_buf_release.patch
> >
> > Before you just go and hit "reply", please:
> >    a) Consider who else should be cc'ed
> >    b) Prefer to cc a suitable mailing list as well
> >    c) Ideally: find the original patch on the mailing list and do a
> >       reply-to-all to that, adding suitable additional cc's
> >
> > *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
> >
> > The -mm tree is included into linux-next and is updated
> > there every 3-4 working days
> >
> > ------------------------------------------------------
> > From: Cong Wang <xiyou.wangcong@gmail.com>
> > Subject: 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().
> >
> > Link: http://lkml.kernel.org/r/20200225204446.11378-1-xiyou.wangcong@gmail.com
> > Fixes: bb2bb9030425 ("dma-buf: add DMA_BUF_SET_NAME ioctls")
> > Reported-by: syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com
> > Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> > Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
> > Acked-by: Chenbo Feng <fengc@google.com>
> > Cc: Sumit Semwal <sumit.semwal@linaro.org>
> > Cc: Greg Hackmann <ghackmann@google.com>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > ---
> >
> >  drivers/dma-buf/dma-buf.c |    1 +
> >  1 file changed, 1 insertion(+)
> >
> > --- a/drivers/dma-buf/dma-buf.c~dma-buf-free-dmabuf-name-in-dma_buf_release
> > +++ a/drivers/dma-buf/dma-buf.c
> > @@ -108,6 +108,7 @@ static int dma_buf_release(struct inode
> >                 dma_resv_fini(dmabuf->resv);
> >
> >         module_put(dmabuf->owner);
> > +       kfree(dmabuf->name);
> >         kfree(dmabuf);
> >         return 0;
> >  }
> > _
> >
> > Patches currently in -mm which might be from xiyou.wangcong@gmail.com are
> >
> > dma-buf-free-dmabuf-name-in-dma_buf_release.patch
> >
> Thanks and best regards,
> Sumit.
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: + dma-buf-free-dmabuf-name-in-dma_buf_release.patch added to -mm tree
  2020-02-26  9:36     ` Daniel Vetter
@ 2020-02-27  4:20       ` Andrew Morton
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2020-02-27  4:20 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Sumit Semwal, mm-commits, Chenbo Feng, DRI mailing list,
	Greg Hackmann, WANG Cong, open list:DMA BUFFER SHARING FRAMEWORK

On Wed, 26 Feb 2020 10:36:26 +0100 Daniel Vetter <daniel@ffwll.ch> wrote:

> On Wed, Feb 26, 2020 at 5:29 AM Sumit Semwal <sumit.semwal@linaro.org> wrote:
> >
> > Hello Andrew,
> >
> >
> > On Wed, 26 Feb 2020 at 07:25, Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > >
> > > The patch titled
> > >      Subject: dma-buf: free dmabuf->name in dma_buf_release()
> > > has been added to the -mm tree.  Its filename is
> > >      dma-buf-free-dmabuf-name-in-dma_buf_release.patch
> >
> > Thanks for taking this patch via -mm during my absence (I'm just
> > returning from a bit of an illness). If there are other dma-buf
> > patches on your radar that you'd like to take via the mm tree, please
> > let me know and I can provide the necessary Acks.
> > Else I will take them in via drm-misc as usual.
> 
> I thought at least that for cases like these -mm is the last resort
> tree, so proper thing to do here is apply this fix to drm-misc-fixes
> and get it out there. -mm rebases, so will fall out again.

Yup, go ahead.  If a patch pops up in linux-next I'll autodrop by copy.

And please do give some thought to whether this should be cc:stable. 
If it's an unprivileged operation then hellyeah.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-27  4:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200203173311.6269a8be06a05e5a4aa08a93@linux-foundation.org>
     [not found] ` <20200226015504.7GW9ptoIA%akpm@linux-foundation.org>
2020-02-26  4:29   ` + dma-buf-free-dmabuf-name-in-dma_buf_release.patch added to -mm tree Sumit Semwal
2020-02-26  9:36     ` Daniel Vetter
2020-02-27  4:20       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).