]> git.baikalelectronics.ru Git - kernel.git/commit
DAC960: split up ioctl function to reduce stack size
authorArnd Bergmann <arnd@arndb.de>
Mon, 11 Dec 2017 12:11:17 +0000 (13:11 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Jan 2018 16:18:00 +0000 (09:18 -0700)
commit42f73650829268413b31306ec848943c9fc1c73c
tree04f6489c7eb1d59331b0fefefcd081ac68f8d524
parentd50a8ebfb563eb51102651d47e101b0728c1cf9c
DAC960: split up ioctl function to reduce stack size

When CONFIG_KASAN is set, all the local variables in this function are
allocated on the stack together, leading to a warning about possible
kernel stack overflow:

drivers/block/DAC960.c: In function 'DAC960_gam_ioctl':
drivers/block/DAC960.c:7061:1: error: the frame size of 2240 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

By splitting up the function into smaller chunks, we can avoid that and
make the code slightly more readable at the same time. The coding style
in this file is completely nonstandard, and I chose to not touch that
at all, leaving the unconventional intendation unchanged to make it
easier to review the diff.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/DAC960.c