]> git.baikalelectronics.ru Git - kernel.git/commit
caif: reduce stack size with KASAN
authorArnd Bergmann <arnd@arndb.de>
Tue, 16 Jan 2018 16:34:00 +0000 (17:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jan 2018 19:02:12 +0000 (14:02 -0500)
commit8de6797416bed09f074164781dc79fab7c5d0f74
tree73dc6d7aad08f3f6cd0328641e870ff9e71e7025
parented1fcff2587c4ba6b4d84c21d36a08bcc6569d8b
caif: reduce stack size with KASAN

When CONFIG_KASAN is set, we can use relatively large amounts of kernel
stack space:

net/caif/cfctrl.c:555:1: warning: the frame size of 1600 bytes is larger than 1280 bytes [-Wframe-larger-than=]

This adds convenience wrappers around cfpkt_extr_head(), which is responsible
for most of the stack growth. With those wrapper functions, gcc apparently
starts reusing the stack slots for each instance, thus avoiding the
problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/caif/cfpkt.h
net/caif/cfctrl.c