[Intel-gfx] [PATCH 10/15] drm/vmwgfx: Delete mmaping functions

Daniel Vetter daniel.vetter at ffwll.ch
Mon Nov 18 17:42:12 UTC 2019


On Mon, Nov 18, 2019 at 6:25 PM Thomas Hellstrom <thellstrom at vmware.com> wrote:
>
> On Mon, 2019-11-18 at 11:35 +0100, Daniel Vetter wrote:
> > No need for stubs, dma-buf.c takes care of that.
> >
> > Aside, not having a ->release callback smelled like refcounting leak
> > somewhere. It will also score you a WARN_ON backtrace in dma-buf.c on
> > every export. But then I found that ttm_device_object_init overwrites
> > it. Overwriting const memory is not going to go down well in recent
> > kernels.
>
> It's actually taking a non-const copy and updating it. Not that that's
> much better, but at least it won't crash due to writing to wp memory.
> I'll add a backlog item to revisit this.

Hm I was looking for that, but didn't spot where it does that. I'll
update the commit message when merging.

> > One more aside: The (un)map_dma_buf can't ever be called because
> > ->attach rejects everything. Might want to drop a BUG_ON(1) in there.
> > Same for ->detach.
>
> And this.
>
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> > Cc: VMware Graphics <linux-graphics-maintainer at vmware.com>
> > Cc: Thomas Hellstrom <thellstrom at vmware.com>
> > ---
> >
>
>
> Reviewed-by: Thomas Hellstrom <thellstrom at vmware.com>

Thanks for your review.

> Will you be taking this through drm-misc?

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


More information about the Intel-gfx mailing list