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

Thomas Hellstrom thellstrom at vmware.com
Mon Nov 18 17:25:12 UTC 2019


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.

> 
> 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>

Will you be taking this through drm-misc?

Thanks,
Thomas



More information about the Intel-gfx mailing list