]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
sparc: Fix -Wstringop-overflow warning
authorOrlando Arias <oarias@knights.ucf.edu>
Tue, 16 May 2017 19:34:00 +0000 (15:34 -0400)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 27 Jun 2017 13:16:14 +0000 (10:16 -0300)
commit3b6079a305c58ca8d2a4a677501be681c6c9dc23
tree57a7d206979bf0572ab207854a7f44d03c85448e
parent8a37fc12c12a6867a59f2c6e1b819e8cafe06eb8
sparc: Fix -Wstringop-overflow warning

BugLink: http://bugs.launchpad.net/bugs/1697001
[ Upstream commit deba804c90642c8ed0f15ac1083663976d578f54 ]

Greetings,

GCC 7 introduced the -Wstringop-overflow flag to detect buffer overflows
in calls to string handling functions [1][2]. Due to the way
``empty_zero_page'' is declared in arch/sparc/include/setup.h, this
causes a warning to trigger at compile time in the function mem_init(),
which is subsequently converted to an error. The ensuing patch fixes
this issue and aligns the declaration of empty_zero_page to that of
other architectures. Thank you.

Cheers,
Orlando.

[1] https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02308.html
[2] https://gcc.gnu.org/gcc-7/changes.html

Signed-off-by: Orlando Arias <oarias@knights.ucf.edu>
--------------------------------------------------------------------------------
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/sparc/include/asm/pgtable_32.h
arch/sparc/include/asm/setup.h
arch/sparc/mm/init_32.c