mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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: 455a7b238c ("block: Add Sed-opal library")
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Scott Bauer <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
24bff4d78a
commit
e225c20eb0
3 changed files with 50 additions and 90 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue