[PATCH] compositor-drm: Don't try and scan out a SHM buffer directly
chris at chris-wilson.co.uk
Fri Sep 14 15:19:20 PDT 2012
On Fri, 14 Sep 2012 23:08:55 +0100, Rob Bradford <rob at robster.org.uk> wrote:
> From: Rob Bradford <rob at linux.intel.com>
> gbm_bo_import will fail to produce a valid bo since the buffer is an SHM
> buffer. This cause a crash when the NULL bo returned by gbm_bo_import is
> dereferenced later.
So since gbm_bo_import() is already verifying that the handle is
suitable for the use case, would it not be wiser to check it return in
case it has to reject the handle for any other reason, or on the off
chance that the scanout can read from any buffer? Not that I'm
advocating remapping user vma like that behind the callers back!
Chris Wilson, Intel Open Source Technology Centre
More information about the wayland-devel