]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
media: go7007: avoid clang frame overflow warning with KASAN
authorArnd Bergmann <arnd@arndb.de>
Tue, 19 Feb 2019 17:01:58 +0000 (12:01 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 13 Aug 2019 12:11:36 +0000 (14:11 +0200)
BugLink: https://bugs.launchpad.net/bugs/1837517
[ Upstream commit ed713a4a1367aca5c0f2f329579465db00c17995 ]

clang-8 warns about one function here when KASAN is enabled, even
without the 'asan-stack' option:

drivers/media/usb/go7007/go7007-fw.c:1551:5: warning: stack frame size of 2656 bytes in function

I have reported this issue in the llvm bugzilla, but to make
it work with the clang-8 release, a small annotation is still
needed.

Link: https://bugs.llvm.org/show_bug.cgi?id=38809
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: fix checkpatch warning]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/media/usb/go7007/go7007-fw.c

index 24f5b615dc7af78d65b3b41e94bec96633d93145..dfa9f899d0c2552c505979662521a0f1a9c66f44 100644 (file)
@@ -1499,8 +1499,8 @@ static int modet_to_package(struct go7007 *go, __le16 *code, int space)
        return cnt;
 }
 
-static int do_special(struct go7007 *go, u16 type, __le16 *code, int space,
-                       int *framelen)
+static noinline_for_stack int do_special(struct go7007 *go, u16 type,
+                                        __le16 *code, int space, int *framelen)
 {
        switch (type) {
        case SPECIAL_FRM_HEAD: