aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-core/dvbdev.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-12-11 07:05:02 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-03-06 04:59:57 -0500
commitf410b4093fdd4d8f4644d3d486afe3040eceef7b (patch)
treec014accd66beade28d0ae75f4e28bcd0bc046c5e /drivers/media/dvb-core/dvbdev.c
parentmedia: em28xx: adjust I2C timeout according with I2C speed (diff)
downloadlinux-dev-f410b4093fdd4d8f4644d3d486afe3040eceef7b.tar.xz
linux-dev-f410b4093fdd4d8f4644d3d486afe3040eceef7b.zip
media: em28xx: split up em28xx_dvb_init to reduce stack size
With CONFIG_KASAN, the init function uses a large amount of kernel stack: drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init.part.4': drivers/media/usb/em28xx/em28xx-dvb.c:2061:1: error: the frame size of 3232 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Using gcc-7 with -fsanitize-address-use-after-scope makes this even worse: drivers/media/usb/em28xx/em28xx-dvb.c: In function 'em28xx_dvb_init': drivers/media/usb/em28xx/em28xx-dvb.c:2069:1: error: the frame size of 4280 bytes is larger than 3072 bytes [-Werror=frame-larger-than=] By splitting out each part of the switch/case statement that has its own local variables into a separate function, no single one of them uses more than 500 bytes, and with a noinline_for_stack annotation we can ensure that they are not merged back together. [mchehab@s-opensource.com: fix conflict with changeset be7fd3c3a8c5 ("media: em28xx: Hauppauge DualHD second tuner functionality")] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-core/dvbdev.c')
0 files changed, 0 insertions, 0 deletions