fs/binfmt_elf.c: don't be afraid of overflow
authorAlexey Dobriyan <[email protected]>
Fri, 8 Mar 2019 00:28:56 +0000 (16:28 -0800)
committerLinus Torvalds <[email protected]>
Fri, 8 Mar 2019 02:32:01 +0000 (18:32 -0800)
commitfaf1c3152032275370f35dc757501ae0c47ded53
treee1475c6f6c72d43053927fb430894d0157a155e3
parenta218cc4914209ac14476cb32769b31a556355b22
fs/binfmt_elf.c: don't be afraid of overflow

Number of ELF program headers is 16-bit by spec, so total size
comfortably fits into "unsigned int".

Space savings: 7 bytes!

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-7 (-7)
Function                                     old     new   delta
load_elf_phdrs                               137     130      -7

Link: http://lkml.kernel.org/r/20190204202715.GA27482@avx2
Signed-off-by: Alexey Dobriyan <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/binfmt_elf.c