diff options
author | Scott Bauer <scott.bauer@intel.com> | 2017-02-15 01:29:36 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-02-15 03:47:18 +0100 |
commit | e225c20eb0fd0b6657e640408f11ee392dc82b5b (patch) | |
tree | 16caa1d305159a1306478a58483278fe13d2e9b2 /drivers/nvme | |
parent | uapi: sed-opal fix IOW for activate lsp to use correct struct (diff) | |
download | linux-e225c20eb0fd0b6657e640408f11ee392dc82b5b.tar.xz linux-e225c20eb0fd0b6657e640408f11ee392dc82b5b.zip |
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 26ae4afd3737..b92a79281611 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -789,7 +789,8 @@ static int nvme_ioctl(struct block_device *bdev, fmode_t mode, return nvme_nvm_ioctl(ns, cmd, arg); #endif if (is_sed_ioctl(cmd)) - return sed_ioctl(&ns->ctrl->opal_dev, cmd, arg); + return sed_ioctl(&ns->ctrl->opal_dev, cmd, + (void __user *) arg); return -ENOTTY; } } |