]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
caif: reduce stack size, again
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Jun 2025 11:22:39 +0000 (13:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:08:45 +0000 (12:08 +0200)
commit655e3f51de5ad0cd3bc451891e41ce0513063f27
treeb32e74bf4c748d57536178be8a6b216dd6df0ac2
parent0abd1f48cd25c8b397d4ee26c6c7e9d24b08ff70
caif: reduce stack size, again

[ Upstream commit b630c781bcf6ff87657146661816d0d30a902139 ]

I tried to fix the stack usage in this function a couple of years ago,
but there is still a problem with the latest gcc versions in some
configurations:

net/caif/cfctrl.c:553:1: error: the frame size of 1296 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]

Reduce this once again, with a separate cfctrl_link_setup() function that
holds the bulk of all the local variables. It also turns out that the
param[] array that takes up a large portion of the stack is write-only
and can be left out here.

Fixes: ce6289661b14 ("caif: reduce stack size with KASAN")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20250620112244.3425554-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/caif/cfctrl.c