diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-07 11:24:28 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-07 11:24:28 +0200 |
commit | 5816339310b2d9623cf413d33e538b45e815da5d (patch) | |
tree | 268187469afc7e9eae439ef613f0c9f86f5e91ba /arch/sparc64/kernel/sys_sparc.c | |
parent | sparc64: Fix initrd regression. (diff) | |
download | linux-5816339310b2d9623cf413d33e538b45e815da5d.tar.xz linux-5816339310b2d9623cf413d33e538b45e815da5d.zip |
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>
Diffstat (limited to 'arch/sparc64/kernel/sys_sparc.c')
-rw-r--r-- | arch/sparc64/kernel/sys_sparc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 8d4761f15fa9..0dbc941f130e 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c @@ -549,13 +549,13 @@ int sparc64_mmap_check(unsigned long addr, unsigned long len, if (len >= STACK_TOP32) return -EINVAL; - if ((flags & MAP_FIXED) && addr > STACK_TOP32 - len) + if (addr > STACK_TOP32 - len) return -EINVAL; } else { if (len >= VA_EXCLUDE_START) return -EINVAL; - if ((flags & MAP_FIXED) && invalid_64bit_range(addr, len)) + if (invalid_64bit_range(addr, len)) return -EINVAL; } |