diff options
-rw-r--r-- | MAINTAINERS | 4 | ||||
-rw-r--r-- | arch/alpha/include/asm/io.h | 4 | ||||
-rw-r--r-- | arch/alpha/lib/udelay.c | 1 | ||||
-rw-r--r-- | drivers/block/zram/zcomp.c | 12 | ||||
-rw-r--r-- | fs/userfaultfd.c | 4 | ||||
-rw-r--r-- | lib/string_helpers.c | 6 | ||||
-rw-r--r-- | mm/kasan/kasan.c | 3 | ||||
-rw-r--r-- | mm/mmap.c | 8 |
8 files changed, 22 insertions, 20 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 7ba7ab749c85..274f85405584 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -6452,11 +6452,11 @@ F: drivers/hwmon/ltc4261.c | |||
6452 | LTP (Linux Test Project) | 6452 | LTP (Linux Test Project) |
6453 | M: Mike Frysinger <vapier@gentoo.org> | 6453 | M: Mike Frysinger <vapier@gentoo.org> |
6454 | M: Cyril Hrubis <chrubis@suse.cz> | 6454 | M: Cyril Hrubis <chrubis@suse.cz> |
6455 | M: Wanlong Gao <gaowanlong@cn.fujitsu.com> | 6455 | M: Wanlong Gao <wanlong.gao@gmail.com> |
6456 | M: Jan Stancek <jstancek@redhat.com> | 6456 | M: Jan Stancek <jstancek@redhat.com> |
6457 | M: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> | 6457 | M: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com> |
6458 | M: Alexey Kodanev <alexey.kodanev@oracle.com> | 6458 | M: Alexey Kodanev <alexey.kodanev@oracle.com> |
6459 | L: ltp-list@lists.sourceforge.net (subscribers-only) | 6459 | L: ltp@lists.linux.it (subscribers-only) |
6460 | W: http://linux-test-project.github.io/ | 6460 | W: http://linux-test-project.github.io/ |
6461 | T: git git://github.com/linux-test-project/ltp.git | 6461 | T: git git://github.com/linux-test-project/ltp.git |
6462 | S: Maintained | 6462 | S: Maintained |
diff --git a/arch/alpha/include/asm/io.h b/arch/alpha/include/asm/io.h index f05bdb4b1cb9..ff4049155c84 100644 --- a/arch/alpha/include/asm/io.h +++ b/arch/alpha/include/asm/io.h | |||
@@ -297,7 +297,9 @@ static inline void __iomem * ioremap_nocache(unsigned long offset, | |||
297 | unsigned long size) | 297 | unsigned long size) |
298 | { | 298 | { |
299 | return ioremap(offset, size); | 299 | return ioremap(offset, size); |
300 | } | 300 | } |
301 | |||
302 | #define ioremap_uc ioremap_nocache | ||
301 | 303 | ||
302 | static inline void iounmap(volatile void __iomem *addr) | 304 | static inline void iounmap(volatile void __iomem *addr) |
303 | { | 305 | { |
diff --git a/arch/alpha/lib/udelay.c b/arch/alpha/lib/udelay.c index 69d52aa37bae..f2d81ff38aa6 100644 --- a/arch/alpha/lib/udelay.c +++ b/arch/alpha/lib/udelay.c | |||
@@ -30,6 +30,7 @@ __delay(int loops) | |||
30 | " bgt %0,1b" | 30 | " bgt %0,1b" |
31 | : "=&r" (tmp), "=r" (loops) : "1"(loops)); | 31 | : "=&r" (tmp), "=r" (loops) : "1"(loops)); |
32 | } | 32 | } |
33 | EXPORT_SYMBOL(__delay); | ||
33 | 34 | ||
34 | #ifdef CONFIG_SMP | 35 | #ifdef CONFIG_SMP |
35 | #define LPJ cpu_data[smp_processor_id()].loops_per_jiffy | 36 | #define LPJ cpu_data[smp_processor_id()].loops_per_jiffy |
diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c index 965d1afb0eaa..5cb13ca3a3ac 100644 --- a/drivers/block/zram/zcomp.c +++ b/drivers/block/zram/zcomp.c | |||
@@ -330,12 +330,14 @@ void zcomp_destroy(struct zcomp *comp) | |||
330 | * allocate new zcomp and initialize it. return compressing | 330 | * allocate new zcomp and initialize it. return compressing |
331 | * backend pointer or ERR_PTR if things went bad. ERR_PTR(-EINVAL) | 331 | * backend pointer or ERR_PTR if things went bad. ERR_PTR(-EINVAL) |
332 | * if requested algorithm is not supported, ERR_PTR(-ENOMEM) in | 332 | * if requested algorithm is not supported, ERR_PTR(-ENOMEM) in |
333 | * case of allocation error. | 333 | * case of allocation error, or any other error potentially |
334 | * returned by functions zcomp_strm_{multi,single}_create. | ||
334 | */ | 335 | */ |
335 | struct zcomp *zcomp_create(const char *compress, int max_strm) | 336 | struct zcomp *zcomp_create(const char *compress, int max_strm) |
336 | { | 337 | { |
337 | struct zcomp *comp; | 338 | struct zcomp *comp; |
338 | struct zcomp_backend *backend; | 339 | struct zcomp_backend *backend; |
340 | int error; | ||
339 | 341 | ||
340 | backend = find_backend(compress); | 342 | backend = find_backend(compress); |
341 | if (!backend) | 343 | if (!backend) |
@@ -347,12 +349,12 @@ struct zcomp *zcomp_create(const char *compress, int max_strm) | |||
347 | 349 | ||
348 | comp->backend = backend; | 350 | comp->backend = backend; |
349 | if (max_strm > 1) | 351 | if (max_strm > 1) |
350 | zcomp_strm_multi_create(comp, max_strm); | 352 | error = zcomp_strm_multi_create(comp, max_strm); |
351 | else | 353 | else |
352 | zcomp_strm_single_create(comp); | 354 | error = zcomp_strm_single_create(comp); |
353 | if (!comp->stream) { | 355 | if (error) { |
354 | kfree(comp); | 356 | kfree(comp); |
355 | return ERR_PTR(-ENOMEM); | 357 | return ERR_PTR(error); |
356 | } | 358 | } |
357 | return comp; | 359 | return comp; |
358 | } | 360 | } |
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 634e676072cb..f9aeb40a7197 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c | |||
@@ -1287,8 +1287,10 @@ static struct file *userfaultfd_file_create(int flags) | |||
1287 | 1287 | ||
1288 | file = anon_inode_getfile("[userfaultfd]", &userfaultfd_fops, ctx, | 1288 | file = anon_inode_getfile("[userfaultfd]", &userfaultfd_fops, ctx, |
1289 | O_RDWR | (flags & UFFD_SHARED_FCNTL_FLAGS)); | 1289 | O_RDWR | (flags & UFFD_SHARED_FCNTL_FLAGS)); |
1290 | if (IS_ERR(file)) | 1290 | if (IS_ERR(file)) { |
1291 | mmput(ctx->mm); | ||
1291 | kmem_cache_free(userfaultfd_ctx_cachep, ctx); | 1292 | kmem_cache_free(userfaultfd_ctx_cachep, ctx); |
1293 | } | ||
1292 | out: | 1294 | out: |
1293 | return file; | 1295 | return file; |
1294 | } | 1296 | } |
diff --git a/lib/string_helpers.c b/lib/string_helpers.c index 54036ce2e2dd..5939f63d90cd 100644 --- a/lib/string_helpers.c +++ b/lib/string_helpers.c | |||
@@ -59,7 +59,11 @@ void string_get_size(u64 size, u64 blk_size, const enum string_size_units units, | |||
59 | } | 59 | } |
60 | 60 | ||
61 | exp = divisor[units] / (u32)blk_size; | 61 | exp = divisor[units] / (u32)blk_size; |
62 | if (size >= exp) { | 62 | /* |
63 | * size must be strictly greater than exp here to ensure that remainder | ||
64 | * is greater than divisor[units] coming out of the if below. | ||
65 | */ | ||
66 | if (size > exp) { | ||
63 | remainder = do_div(size, divisor[units]); | 67 | remainder = do_div(size, divisor[units]); |
64 | remainder *= blk_size; | 68 | remainder *= blk_size; |
65 | i++; | 69 | i++; |
diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 7b28e9cdf1c7..8da211411b57 100644 --- a/mm/kasan/kasan.c +++ b/mm/kasan/kasan.c | |||
@@ -135,12 +135,11 @@ static __always_inline bool memory_is_poisoned_16(unsigned long addr) | |||
135 | 135 | ||
136 | if (unlikely(*shadow_addr)) { | 136 | if (unlikely(*shadow_addr)) { |
137 | u16 shadow_first_bytes = *(u16 *)shadow_addr; | 137 | u16 shadow_first_bytes = *(u16 *)shadow_addr; |
138 | s8 last_byte = (addr + 15) & KASAN_SHADOW_MASK; | ||
139 | 138 | ||
140 | if (unlikely(shadow_first_bytes)) | 139 | if (unlikely(shadow_first_bytes)) |
141 | return true; | 140 | return true; |
142 | 141 | ||
143 | if (likely(!last_byte)) | 142 | if (likely(IS_ALIGNED(addr, 8))) |
144 | return false; | 143 | return false; |
145 | 144 | ||
146 | return memory_is_poisoned_1(addr + 15); | 145 | return memory_is_poisoned_1(addr + 15); |
@@ -612,8 +612,6 @@ static unsigned long count_vma_pages_range(struct mm_struct *mm, | |||
612 | void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma, | 612 | void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma, |
613 | struct rb_node **rb_link, struct rb_node *rb_parent) | 613 | struct rb_node **rb_link, struct rb_node *rb_parent) |
614 | { | 614 | { |
615 | WARN_ONCE(vma->vm_file && !vma->vm_ops, "missing vma->vm_ops"); | ||
616 | |||
617 | /* Update tracking information for the gap following the new vma. */ | 615 | /* Update tracking information for the gap following the new vma. */ |
618 | if (vma->vm_next) | 616 | if (vma->vm_next) |
619 | vma_gap_update(vma->vm_next); | 617 | vma_gap_update(vma->vm_next); |
@@ -1638,12 +1636,6 @@ unsigned long mmap_region(struct file *file, unsigned long addr, | |||
1638 | */ | 1636 | */ |
1639 | WARN_ON_ONCE(addr != vma->vm_start); | 1637 | WARN_ON_ONCE(addr != vma->vm_start); |
1640 | 1638 | ||
1641 | /* All file mapping must have ->vm_ops set */ | ||
1642 | if (!vma->vm_ops) { | ||
1643 | static const struct vm_operations_struct dummy_ops = {}; | ||
1644 | vma->vm_ops = &dummy_ops; | ||
1645 | } | ||
1646 | |||
1647 | addr = vma->vm_start; | 1639 | addr = vma->vm_start; |
1648 | vm_flags = vma->vm_flags; | 1640 | vm_flags = vma->vm_flags; |
1649 | } else if (vm_flags & VM_SHARED) { | 1641 | } else if (vm_flags & VM_SHARED) { |