x86/mpx: Restrict the mmap() size check to bounds tables
[deliverable/linux.git] / arch / x86 / mm / mpx.c
index 47e4a8564012deb3a5c4bff84ef52cb88ba2dd6b..d6e02f3adee0911299189f9ff13fbf200a4aad51 100644 (file)
@@ -46,8 +46,8 @@ static unsigned long mpx_mmap(unsigned long len)
        vm_flags_t vm_flags;
        struct vm_area_struct *vma;
 
-       /* Only bounds table and bounds directory can be allocated here */
-       if (len != MPX_BD_SIZE_BYTES && len != MPX_BT_SIZE_BYTES)
+       /* Only bounds table can be allocated here */
+       if (len != MPX_BT_SIZE_BYTES)
                return -EINVAL;
 
        down_write(&mm->mmap_sem);
This page took 0.024727 seconds and 5 git commands to generate.