Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sparc: Fix mmap VA span checking.

We should not conditionalize VA range checks on MAP_FIXED.

Signed-off-by: David S. Miller <davem@davemloft.net>

+3 -4
+1 -2
arch/sparc/kernel/sys_sparc.c
··· 223 223 { 224 224 if (ARCH_SUN4C_SUN4 && 225 225 (len > 0x20000000 || 226 - ((flags & MAP_FIXED) && 227 - addr < 0xe0000000 && addr + len > 0x20000000))) 226 + (addr < 0xe0000000 && addr + len > 0x20000000))) 228 227 return -EINVAL; 229 228 230 229 /* See asm-sparc/uaccess.h */
+2 -2
arch/sparc64/kernel/sys_sparc.c
··· 549 549 if (len >= STACK_TOP32) 550 550 return -EINVAL; 551 551 552 - if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len) 552 + if (addr > STACK_TOP32 - len) 553 553 return -EINVAL; 554 554 } else { 555 555 if (len >= VA_EXCLUDE_START) 556 556 return -EINVAL; 557 557 558 - if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len)) 558 + if (invalid_64bit_range(addr, len)) 559 559 return -EINVAL; 560 560 } 561 561