The ubuntu-xenial kernel doesn't compile if you use -Werror=incompatible-pointer-types. This seems to be due to ubuntu/i915, though it's possible there are others. For example, in ubuntu/i915/i915_gem_dmabuf.c, the signatures of the functions handed off to dma_buf_ops's begin_cpu_access and end_cpu_access don't match those expected in the struct. This seems like a recipe for undefined behavior.
The ubuntu-xenial kernel doesn't compile if you use -Werror= incompatible- pointer- types. This seems to be due to ubuntu/i915, though it's possible there are others. For example, in ubuntu/ i915/i915_ gem_dmabuf. c, the signatures of the functions handed off to dma_buf_ops's begin_cpu_access and end_cpu_access don't match those expected in the struct. This seems like a recipe for undefined behavior.