diff mbox series

[01/13,3.18-stable] ARM: cns3xxx: shut up frame size warning

Message ID 20170504205209.498721-2-arnd@arndb.de
State Superseded
Headers show
Series backported build fixes | expand

Commit Message

Arnd Bergmann May 4, 2017, 8:51 p.m. UTC
This shuts up a warning in the 3.18-stable series that has been fixed
in newer kernels with commit 498a92d42596 ("ARM: cns3xxx: pci: avoid
potential stack overflow"):

arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':
arch/arm/mach-cns3xxx/pcie.c:313:1: error: the frame size of 1080 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

The fix that went into v4.4 is known to be buggy and was later
fixed again with commit 88e9da9a2a70 ("CNS3xxx: Fix PCI
cns3xxx_write_config()"). While we could backport both to 3.18,
they are fairly invasive and the warning is definitely harmless
here as the call chain is known to not overflow the stack of the
init task.

This simply adds a Makefile flag to extend the limit for this one
file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
We do want 88e9da9a2a70 ("CNS3xxx: Fix PCI cns3xxx_write_config()")
backported into v4.4 though.
---
 arch/arm/mach-cns3xxx/Makefile | 1 +
 1 file changed, 1 insertion(+)

-- 
2.9.0

Comments

Greg KH May 4, 2017, 10:27 p.m. UTC | #1
On Thu, May 04, 2017 at 10:51:57PM +0200, Arnd Bergmann wrote:
> This shuts up a warning in the 3.18-stable series that has been fixed

> in newer kernels with commit 498a92d42596 ("ARM: cns3xxx: pci: avoid

> potential stack overflow"):

> 

> arch/arm/mach-cns3xxx/pcie.c: In function 'cns3xxx_pcie_hw_init':

> arch/arm/mach-cns3xxx/pcie.c:313:1: error: the frame size of 1080 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

> 

> The fix that went into v4.4 is known to be buggy and was later

> fixed again with commit 88e9da9a2a70 ("CNS3xxx: Fix PCI

> cns3xxx_write_config()"). While we could backport both to 3.18,

> they are fairly invasive and the warning is definitely harmless

> here as the call chain is known to not overflow the stack of the

> init task.

> 

> This simply adds a Makefile flag to extend the limit for this one

> file.

> 

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

> We do want 88e9da9a2a70 ("CNS3xxx: Fix PCI cns3xxx_write_config()")

> backported into v4.4 though.


That's already there, thanks.

greg k-h
diff mbox series

Patch

diff --git a/arch/arm/mach-cns3xxx/Makefile b/arch/arm/mach-cns3xxx/Makefile
index a1ff10848698..fd610561616e 100644
--- a/arch/arm/mach-cns3xxx/Makefile
+++ b/arch/arm/mach-cns3xxx/Makefile
@@ -2,4 +2,5 @@  obj-$(CONFIG_ARCH_CNS3XXX)		+= cns3xxx.o
 cns3xxx-y				+= core.o pm.o
 cns3xxx-$(CONFIG_ATAGS)			+= devices.o
 cns3xxx-$(CONFIG_PCI)			+= pcie.o
+CFLAGS_pcie.o				+= -Wframe-larger-than=1536 # override default 1024, this is safe here
 cns3xxx-$(CONFIG_MACH_CNS3420VB)	+= cns3420vb.o