Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / drivers / staging / android / ashmem.c
index 8a8078f954d5a7dc7ea8321df886ec54d8462999..ca9a53c03f0f9a706c7f145ef446976d89d1773a 100644 (file)
@@ -385,8 +385,8 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
        }
 
        /* requested protection bits must match our allowed protection mask */
-       if (unlikely((vma->vm_flags & ~calc_vm_prot_bits(asma->prot_mask)) &
-                    calc_vm_prot_bits(PROT_MASK))) {
+       if (unlikely((vma->vm_flags & ~calc_vm_prot_bits(asma->prot_mask, 0)) &
+                    calc_vm_prot_bits(PROT_MASK, 0))) {
                ret = -EPERM;
                goto out;
        }