]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8712: reduce stack usage, again
authorArnd Bergmann <arnd@arndb.de>
Fri, 28 Jun 2019 12:37:48 +0000 (14:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Jun 2019 12:54:45 +0000 (14:54 +0200)
commitb97b8cc05e3e5bbd472aa4996e3f0f67e6b00d9f
tree0e4b37f0ada20cd067d5f7f7caf63f4499dfb586
parentd1c8fcdd02e3e35836e1e49479f69bf5bbd3249a
staging: rtl8712: reduce stack usage, again

An earlier patch I sent reduced the stack usage enough to get
below the warning limit, and I could show this was safe, but with
GCC_PLUGIN_STRUCTLEAK_BYREF_ALL, it gets worse again because large stack
variables in the same function no longer overlap:

drivers/staging/rtl8712/rtl871x_ioctl_linux.c: In function 'translate_scan.isra.2':
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:322:1: error: the frame size of 1200 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Split out the largest two blocks in the affected function into two
separate functions and mark those noinline_for_stack.

Fixes: 069aa88ae53e ("staging: rtl8712: reduce stack usage")
Fixes: 9bce5cf09820 ("gcc-plugins: structleak: Generalize to all variable types")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c