lkml.org 
[lkml]   [2019]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -mm 2/3] ELF, coredump: delete duplicated overflow check
array_size() macro will do overflow check anyway.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

fs/binfmt_elf.c | 2 --
1 file changed, 2 deletions(-)

--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -2257,8 +2257,6 @@ static int elf_core_dump(struct coredump_params *cprm)

dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE);

- if (segs - 1 > ULONG_MAX / sizeof(*vma_filesz))
- goto end_coredump;
vma_filesz = kvmalloc(array_size(sizeof(*vma_filesz), (segs - 1)),
GFP_KERNEL);
if (ZERO_OR_NULL_PTR(vma_filesz))
\
 
 \ /
  Last update: 2019-12-22 15:41    [W:0.052 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site