summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorScott Bauer <scott.bauer@intel.com>2017-02-14 17:29:36 -0700
committerJens Axboe <axboe@fb.com>2017-02-14 19:47:18 -0700
commite225c20eb0fd0b6657e640408f11ee392dc82b5b (patch)
tree16caa1d305159a1306478a58483278fe13d2e9b2 /drivers/nvme
parent24bff4d78a572d25fe2a0818f55bebda8a2d4709 (diff)
downloadblackbird-op-linux-e225c20eb0fd0b6657e640408f11ee392dc82b5b.tar.gz
blackbird-op-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.c3
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;
}
}
OpenPOWER on IntegriCloud