]> asedeno.scripts.mit.edu Git - linux.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)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 19 Mar 2019 18:00:32 +0000 (14:00 -0400)
commite855165f3dae6f71da859a5f00b85d5368641d61
tree6c7877d665815dafda635198bfd128ac5f8b2d17
parent7afb0df554292dca7568446f619965fb8153085d
media: vicodec: avoid clang frame size warning

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>
drivers/media/platform/vicodec/codec-fwht.c