]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.4.181/media-go7007-avoid-clang-frame-overflow-warning-with.patch
Linux 4.4.181
[thirdparty/kernel/stable-queue.git] / releases / 4.4.181 / media-go7007-avoid-clang-frame-overflow-warning-with.patch
1 From b542c9f167481af14ea715399d9277ecd5f9c48d Mon Sep 17 00:00:00 2001
2 From: Arnd Bergmann <arnd@arndb.de>
3 Date: Tue, 19 Feb 2019 12:01:58 -0500
4 Subject: media: go7007: avoid clang frame overflow warning with KASAN
5
6 [ Upstream commit ed713a4a1367aca5c0f2f329579465db00c17995 ]
7
8 clang-8 warns about one function here when KASAN is enabled, even
9 without the 'asan-stack' option:
10
11 drivers/media/usb/go7007/go7007-fw.c:1551:5: warning: stack frame size of 2656 bytes in function
12
13 I have reported this issue in the llvm bugzilla, but to make
14 it work with the clang-8 release, a small annotation is still
15 needed.
16
17 Link: https://bugs.llvm.org/show_bug.cgi?id=38809
18
19 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
20 Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
21 [hverkuil-cisco@xs4all.nl: fix checkpatch warning]
22 Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
23 Signed-off-by: Sasha Levin <sashal@kernel.org>
24 ---
25 drivers/media/usb/go7007/go7007-fw.c | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28 diff --git a/drivers/media/usb/go7007/go7007-fw.c b/drivers/media/usb/go7007/go7007-fw.c
29 index 60bf5f0644d11..a5efcd4f7b4f5 100644
30 --- a/drivers/media/usb/go7007/go7007-fw.c
31 +++ b/drivers/media/usb/go7007/go7007-fw.c
32 @@ -1499,8 +1499,8 @@ static int modet_to_package(struct go7007 *go, __le16 *code, int space)
33 return cnt;
34 }
35
36 -static int do_special(struct go7007 *go, u16 type, __le16 *code, int space,
37 - int *framelen)
38 +static noinline_for_stack int do_special(struct go7007 *go, u16 type,
39 + __le16 *code, int space, int *framelen)
40 {
41 switch (type) {
42 case SPECIAL_FRM_HEAD:
43 --
44 2.20.1
45