]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: cls_flower: reduce fl_change stack size
authorArnd Bergmann <arnd@arndb.de>
Thu, 19 Jan 2017 09:45:31 +0000 (10:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Jan 2017 16:18:53 +0000 (11:18 -0500)
commit26e76c27ee36312c30507f941713d267bf5ed4de
tree26d54249aa6207b33c3427f910ac9fef26b9a99a
parentcbe8363e18ec047bb64de3925f591293782ad83e
net/sched: cls_flower: reduce fl_change stack size

The new ARP support has pushed the stack size over the edge on ARM,
as there are two large objects on the stack in this function (mask
and tb) and both have now grown a bit more:

net/sched/cls_flower.c: In function 'fl_change':
net/sched/cls_flower.c:928:1: error: the frame size of 1072 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

We can solve this by dynamically allocating one or both of them.
I first tried to do it just for the mask, but that only saved
152 bytes on ARM, while this version just does it for the 'tb'
array, bringing the stack size back down to 664 bytes.

Fixes: 69cbf734f5ac ("net/sched: cls_flower: Support matching on ARP")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_flower.c