[PATCH 2/2] drm/etnaviv: fix mmap operations for userptr and dma-buf objects

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Apr 27 20:27:10 UTC 2016


On Wed, Apr 27, 2016 at 02:39:21PM +0200, Lucas Stach wrote:
> +static int etnaviv_gem_userptr_mmap_obj(struct etnaviv_gem_object *etnaviv_obj,
> +		struct vm_area_struct *vma)
> +{
> +	return -EPERM;
> +}

       EPERM  The prot argument asks for PROT_EXEC but the mapped area belongs
              to a file on a file system that was mounted no-exec.

It seems this error code is not suitable for this application - it
doesn't fit the spirit of EPERM.  The universal EINVAL would probably
be better.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.


More information about the dri-devel mailing list