]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - block/sed-opal.c
Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN
authorScott Bauer <scott.bauer@intel.com>
Wed, 15 Feb 2017 00:29:36 +0000 (17:29 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 15 Feb 2017 02:47:18 +0000 (19:47 -0700)
commite225c20eb0fd0b6657e640408f11ee392dc82b5b
tree16caa1d305159a1306478a58483278fe13d2e9b2
parent24bff4d78a572d25fe2a0818f55bebda8a2d4709
Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

When CONFIG_KASAN is enabled, compilation fails:

block/sed-opal.c: In function 'sed_ioctl':
block/sed-opal.c:2447:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Moved all the ioctl structures off the stack and dynamically allocate
using _IOC_SIZE()

Fixes: 455a7b238cd6 ("block: Add Sed-opal library")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/sed-opal.c
drivers/nvme/host/core.c
include/linux/sed-opal.h