diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-09-11 00:38:47 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-09-11 00:38:47 +0200 |
commit | c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4 (patch) | |
tree | 533a2077028e02a851e51ad509a0aa3a9107999f /arch/powerpc/kernel/syscalls.c | |
parent | drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() (diff) | |
parent | Merge tag 'acpi-5.15-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
download | linux-c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4.tar.xz linux-c2f4954c2d3fc4f77b46c67585e17a58df4ba8e4.zip |
Merge branch 'linus' into smp/urgent
Ensure that all usage sites of get/put_online_cpus() except for the
struggler in drivers/thermal are gone. So the last user and the deprecated
inlines can be removed.
Diffstat (limited to 'arch/powerpc/kernel/syscalls.c')
-rw-r--r-- | arch/powerpc/kernel/syscalls.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index bf4ae0f0e36c..825931e400df 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c @@ -41,20 +41,13 @@ static inline long do_mmap2(unsigned long addr, size_t len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off, int shift) { - long ret = -EINVAL; - if (!arch_validate_prot(prot, addr)) - goto out; + return -EINVAL; - if (shift) { - if (off & ((1 << shift) - 1)) - goto out; - off >>= shift; - } + if (!IS_ALIGNED(off, 1 << shift)) + return -EINVAL; - ret = ksys_mmap_pgoff(addr, len, prot, flags, fd, off); -out: - return ret; + return ksys_mmap_pgoff(addr, len, prot, flags, fd, off >> shift); } SYSCALL_DEFINE6(mmap2, unsigned long, addr, size_t, len, |