]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: vicodec: avoid clang frame size warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 22 Feb 2019 14:50:03 +0000 (09:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:53 +0000 (06:43 -0700)
commitf5cbd513bb8b64e8a8bb350454fe7318021dfd68
treea00ff7dd67bc71e79bf4105d0e0ea99ce54ebc95
parent6fb2ea5513053553956fd677b4a4265cba25f173
media: vicodec: avoid clang frame size warning

[ Upstream commit e855165f3dae6f71da859a5f00b85d5368641d61 ]

Clang-9 makes some different inlining decisions compared to gcc, which
leads to a warning about a possible stack overflow problem when building
with CONFIG_KASAN, including when setting asan-stack=0, which avoids
most other frame overflow warnings:

drivers/media/platform/vicodec/codec-fwht.c:673:12: error: stack frame size of 2224 bytes in function 'encode_plane'

Manually adding noinline_for_stack annotations in those functions
called by encode_plane() or decode_plane() that require a significant
amount of kernel stack makes this impossible to happen with any
compiler.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/vicodec/codec-fwht.c