media: staging/intel-ipu3-v4l: reduce kernel stack usage
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Mar 2019 20:28:42 +0000 (15:28 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 20 Mar 2019 10:30:17 +0000 (06:30 -0400)
commit6d5f26f2e045f2377b524516194657c00efbbce8
treec12262879cbabeda63797e142b49962413bd1eb4
parent76eb24fc233b8c94b2156ead5811e08d2046ad58
media: staging/intel-ipu3-v4l: reduce kernel stack usage

The v4l2_pix_format_mplane structure is too large to be put on the kernel
stack, as we can see in 32-bit builds:

drivers/staging/media/ipu3/ipu3-v4l2.c: In function 'imgu_fmt':
drivers/staging/media/ipu3/ipu3-v4l2.c:753:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

By dynamically allocating this array, the stack usage goes down to an
acceptable 272 bytes for the same x86-32 configuration.

Fixes: a0ca1627b450 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/ipu3/ipu3-v4l2.c